User Tools

Site Tools


cheatsheet:git

This is an old revision of the document!


git command cheatsheet

unstage files (if you have "git add" the wrong file)

git restore --staged some.file

revert 1 or more local commits (not yet pushed)

$ git reset --soft HEAD~1
 
Unstaged changes after reset:
D	somefolder/somefile
M	somefolder/someother.file
cheatsheet/git.1676361645.txt.gz · Last modified: 2023/02/14 08:00 by kamaradski