git branch <name>
git branch
git checkout <branch name>
for example, we want to merge other branch to main branch
git checkout main
git merge <other-branch>
git checkout main # switch to main branch
git pull origin main # get the latest changes in main branch
git merge <Branch name to merge> # merge with the update branch
git push origin main # upload the changes to master
once you have applied the changes to merge conflict, you can type:
git add .
git merge --continue
to continue merging after the merge conflict
git merge --abort
git rebase master
git rebase --continue
git rebase --abort
cd local git
git checkout master
git remote add origin <github repo url>
git push origin main
git pull origin main
git checkout <old_name> # switch to local branch you want to rename
git branch -m <new_name> # Rename local branch to desired name
git push origin - u <new_name> # Push the new local branch name and reset the upstream
git push origin --delete <old_name> # Delete the old_name remote branch
git clone https://github.com/microsoft/vscode.git