π
π
π
π
Git-Help
Git Cheatsheet
Searchβ¦
A Simple Git Help
Basics
Git Branching
Pull Request
Submodules
Commands
Commit changes to other branch
git log
git status
git init
Amend a commit
Reset a file or full
Undo git add
Get remote repo url
Add or Set Remote URL
Credits & Other
Other good links
Credits
Powered By
GitBook
Undo git add
How to undo/remove file after 'git add'
Lets say you mistakenly added a file using the following command.
1
git add abc.txt
Copied!
To undo adding run the following.
1
git
reset HEAD abc.txt
Copied!
Dont do git reset, you will loose changes
1
git
reset abc.txt
<
---- DONT DO THIS
Copied!
β
https://stackoverflow.com/questions/348170/how-do-i-undo-git-add-before-commit
β
Commands - Previous
Reset a file or full
Next - Commands
Get remote repo url
Last modified
9mo ago
Copy link