develog

[git] rollback 본문

Dev/git

[git] rollback

냐옴 2021. 3. 2. 10:51

revert change one file

git checkout HEAD -- <filePath>

revert changes all

git checkout .

remove untracked files and directories

git clean -fd

 

stackoverflow.com/questions/1146973/how-do-i-revert-all-local-changes-in-git-managed-project-to-previous-state

 

How do I revert all local changes in Git managed project to previous state?

I have a project in which I ran git init. After several commits, I did git status which told me everything was up to date and there were no local changes. Then I made several consecutive changes ...

stackoverflow.com

 

'Dev > git' 카테고리의 다른 글

[git] merge vs rebase  (0) 2021.03.31
[git] git branching model  (0) 2021.03.31
[git] .gitignore  (0) 2021.03.18
[git] git status untracked file not showing  (0) 2021.03.17
[git] config, init  (0) 2020.01.09
Comments