git status: to check status
Switch Branch: git checkout -b branchName
git pull: to pull code
git stash save "name"
git stash pop: to get files from stash
git log: to view log
git status: to view status
git branch -r: to view all branch
git checkout branchName: to checkout or switch branch
git cherry-pick -x idCommit
git push: to push all commits
git add pathfile1 pathfile2 or -A ( all files).
git commit -m "name of commit"
git push
Revert commit:
git reset --hard <Commit_id_truoc>
git push --force
revert all changing file:
git checkout -- .
revert spec file
git checkout filename
Merge from branch develop to abc
abc: git pull origin develop
--Git tag
list tag: git tag-- Create tag:
git tag "tagName"
git push --tags
-- checkout from tag existed
git fetch --all --tags
git checkout "tagName"
-- Create a branch from a tag:
git checkout -b "branchName" "tagName"
--view log graph
git log --graph
--push new branch
git push -u origin branchName






0 comments:
Đăng nhận xét