User:Timothee Flutre/Notebook/Postdoc/2012/08/14
From OpenWetWare
(Difference between revisions)
m (→About Git) |
(→About Git: add git reset) |
||
| Line 32: | Line 32: | ||
** One can look at the differences file by file: <code>git diff --color-words colleague1:paper_main.tex master:paper_main.tex</code>. The options "--color-words" is especially useful in LaTeX. | ** One can look at the differences file by file: <code>git diff --color-words colleague1:paper_main.tex master:paper_main.tex</code>. The options "--color-words" is especially useful in LaTeX. | ||
** To merge the content of "master" into his own branch, we do: <code>git merge master</code>. | ** To merge the content of "master" into his own branch, we do: <code>git merge master</code>. | ||
| - | ** In case of conflicts, we have to edit our own files by hand. Or we can also choose to ignore the conflicts and overwrite our local files with the content of "master": <code>git checkout --patch master paper_main.tex</code>. | + | ** In case of conflicts, we have to edit our own files by hand. Or we can also choose to ignore the conflicts and overwrite our local files with the content of "master" one file at a time: <code>git checkout --patch master paper_main.tex</code>. Even more radical, we can decide to "overwrite" our personal local branch with our local, recently-updated "master" branch (all files at once): <code>git checkout colleague1</code> followed by <code>git reset --hard master</code>. |
<!-- ##### DO NOT edit below this line unless you know what you are doing. ##### --> | <!-- ##### DO NOT edit below this line unless you know what you are doing. ##### --> | ||
Revision as of 12:39, 25 October 2012
Main project page Previous entry Next entry
| |
About Git
| |



