salmanbao / git-practice

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

git-practice

git status
git add .
git commit -m ""
git push
git log
git stash (move the changes from staging area to stash)
git stash pop
git checkout <commit hash first 4 bytes> <filename>
git checkout -b <branch-name> (create a new branch)
git rebase <branch name> (merge the current branch with the given branch)
git reset --hard HEAD^ (revert the last commnit)
git checkout --orphan <new-branch-name> (create branch without history)
git checkout -b <new-branch-name> <commit-hash> (create a new branch from a specific commit )

About


Languages

Language:HTML 100.0%