User Tools

Site Tools


it:git

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
it:git [2018/11/30 11:52]
pmay [Zu Remote Branch wechseln]
it:git [2019/01/31 09:20] (current)
pmay [Change last Commit]
Line 20: Line 20:
 git branch <​lokaler_name>​ origin/<​remote_name>​ git branch <​lokaler_name>​ origin/<​remote_name>​
 git checkout <​lokaler_name>​ git checkout <​lokaler_name>​
 +</​code>​
 +
 +===== Undo things =====
 +
 +==== Unstage all files you have staged with git add ====
 +<code bash>
 +git reset
 +</​code>​
 +
 +==== Revert all local uncommitted changes ====
 +This should be executed in repo root:
 +<code bash>
 +git checkout .
 +</​code>​
 +
 +Yet another way to revert all uncommitted changes (longer to type, but works from any subdirectory):​
 +<code bash>
 +git reset --hard HEAD
 </​code>​ </​code>​
  
it/git.txt · Last modified: 2019/01/31 09:20 by pmay