Post

Git merge to master

Git merge to master

Merge a branch to master

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# Switch to a new branch
git checkout -b new_branch
# Confirm the git status
git status
# Fetch the latest changes from the upstream repository
git fetch upstream master
# Merge the changes from the upstream repository
git merge upstream/master
# Push the new branch to the remote repository
git push -u origin new_branch
# Switch to the master branch
git checkout master
# Merge the new branch to the master branch
git merge new_branch
# Push the changes to the remote repository
git push origin master
This post is licensed under CC BY 4.0 by the author.