Skip to content

Latest commit

 

History

History
72 lines (49 loc) · 1015 Bytes

File metadata and controls

72 lines (49 loc) · 1015 Bytes

Handle branches

  1. List all branches:
git branch -a
  1. Check out a branch:
git checkout main
  1. Delete a branch locally:
git branch -d master
  1. Delete a branch remotely:
git push origin -d master
  1. Merge all files from master to main:
git:(master) git branch main
git:(master) git checkout main
git:(main) git pull origin master
git:(main) git checkout master
git:(master) git pull

git pull --rebase
git push --set-upstream origin main
# if get a rejected error, continue to push #
git push -f origin main
# Now delete master branch local/remote #
git branch --remotes --delete origin/master
git push origin --delete master
  1. Check out all submouldes:
git submodule update --init --recursive
  1. Create multiple releases:

Check out the current branch:

git checkout release/1.0.2

Create a new branch:

git checkout -b release/1.0.3

Push the new branch to the remote:

git push -u origin release/1.0.3