- List all branches:
git branch -a- Check out a branch:
git checkout main- Delete a branch locally:
git branch -d master- Delete a branch remotely:
git push origin -d master- 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- Check out all submouldes:
git submodule update --init --recursive- Create multiple releases:
Check out the current branch:
git checkout release/1.0.2Create a new branch:
git checkout -b release/1.0.3Push the new branch to the remote:
git push -u origin release/1.0.3