Git Commands
Git Commands
Commands Function
git restore —staged sample.txt it will unstage the changes that is commited
git stash pop temp changes are poped and changes the code
git remote add origin <url> connect our remote branch with local
git push origin master pushes the code to the origin and master branch
Git Commands 1
git reset HEAD~2 it will unstage the last 2 commits
git diff shows the difference between new and old changes
git add -p filename we can partially stage the changes in the file
Rebase:
Squash:
Git Commands 2
it is combining all the commits and
merging it as 1 commit.
Git Commands 3