I'll collect some random git tips here, in case I forget how to do something. * Revert a file in your working copy to what it is on the current branch; undo changes for this file:<br /><code>git checkout filename<br /></code>(Git checkout is also used to switch branches; if there is a branch with the same name as filename, you must use =git checkout -- filename=) * You added partial changes using "git add --patch", and want to test those changes you are about to commit: Stash what is not to be committed by using "git stash save --keep-index". http://stackoverflow.com/questions/7650797/stashing-only-un-staged-changes-in-git -- Main.JasonDhiaMansour - 2015-11-17
This topic: Sandbox
>
TWikiUsers
>
JasonDhiaMansour
>
JasonDhiaMansourSandbox
>
GitCheatSheet
Topic revision: r2 - 2015-11-25 - JasonDhiaMansour
Copyright &© 2008-2021 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use
Discourse
or
Send feedback