Difference between revisions of "Using Git"
Jump to navigation
Jump to search
Line 3: | Line 3: | ||
git checkout -- <path> |
git checkout -- <path> |
||
</pre> |
</pre> |
||
If "path" is ".", you undo all your changes to version controlled files |
If "path" is ".", you undo all your changes to version controlled files: |
||
<pre> |
|||
git checkout -- . |
|||
</pre> |
|||
==Merge conflict: Throw away local changes== |
==Merge conflict: Throw away local changes== |
Revision as of 17:14, 3 October 2013
Removing/undoing your changes to a file
git checkout -- <path>
If "path" is ".", you undo all your changes to version controlled files:
git checkout -- .
Merge conflict: Throw away local changes
git checkout master <path> git commit git merge master
(The last command should now do nothing, just say you're fully merged.)