Let’s say you’re on the ‘Dev’ branch and want to push your changes all the way to master…

1. Verify you are on the ‘Dev’ branch

git branch

2. Pull any/all changes to avoid merge conflicts

git pull

3. Add all of your changes to the staging area

git add --all

4. Commit those changes to the ‘Dev’ branch

git commit -m "Adding Changes"

5. Merge the ‘Master’ branch into the ‘Dev’ branch and work out conflicts

git merge master

6. Switch to the ‘Master’ branch and merge the ‘Dev’ branch into the ‘Master branch’

git checkout master
git merge Dev

Leave a Reply

Your email address will not be published. Required fields are marked *