![]() This procedure will make sure there's a merge commit from development to master that people can see, then if they go look at the development branch they can see the individual commits you've made to that branch during its development. The no-ff flag will create a commit node in master for the whole merge to be trackable.Īfter that you can commit and push your merge. Then you merge the development branch onto the local master. The second will perform a merge and create conflicts that you can then resolve.Īfter doing so, you can finally checkout master to switch to master. The first command will make sure you have all upstream commits made to remote master, with Sailesh response that would not happen. $ git merge -no-ff development (there won't be any conflicts now) Git merge -no-ff dev # merge the "dev" branch into the "master" one. Git checkout master # switch to "master", which is the branch you want to be merged. Git merge master # optionally, this command is being used to resolve any conflicts if you pushed any changes to your "master" but "dev" doesn't have that commit. git checkout dev # switch to "dev" branch if you're not already. Merge your "dev" branch into the "master". Git push -u origin dev # push the changes to the remote, -u origin dev is optional but good to use. Git commit -S -m "my first commit to the dev branch" # remove the -S if you're not "secure", secure = when you already setup crypto private and public keys (i.e "verified" green sign in github) Make your changes to the "dev" branch (your current if you follow step 1), commit and push them to the remote "dev" branch. Git push -set-upstream origin dev # push the "dev" branch to the remote. # branch's files will be cloned to the new branch by-default. # No need to git add or git commit, the current ![]() I also recommend using the Sourcetree App to see visual tree of changes and branches.Ĭreate and switch to a new "dev" branch, where your local git files are in-synced with the remote but "dev" branch does not exist yet. $ git push # pushes all “new_branch” commits to both branches - “master” and “new_branch” Master shouldn’t have any commits ahead, otherwise there will be a need for pull and merging code by hands! $ git merge development # merges files in localhost. $ git checkout master # goes to master branch
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |