User:Timothee Flutre/Notebook/Postdoc/2012/08/14: Difference between revisions
From OpenWetWare
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 09:39, 25 October 2012
Project name | <html><img src="/images/9/94/Report.png" border="0" /></html> Main project page <html><img src="/images/c/c3/Resultset_previous.png" border="0" /></html>Previous entry<html> </html>Next entry<html><img src="/images/5/5c/Resultset_next.png" border="0" /></html> |
About Git
|