![]() ![]() If that's the case, creating branches is more of a convenience for working on multiple discrete changes and being able to switch between them cleanly. ![]() The reason I say that is because if you've merged your feature_branch to your local master, how do you then push it to origin master with an opportunity for someone else to review & merge your commit? I don't think you can create a pull request from your local to a remote, only push directly,Īlthough, workflows in git differ, so this might work for you if no-one is reviewing the code and you are happy to just push direct to origin/master. Someone else reviews & merges your (squashed) commit to origin/master.Squash is one of several tools available under Git's interactive rebasing. create a pull request from the remote feature_branch to the remote master (origin/master). I'll show you how to combine commits using Git's squash tool.push your feature_branch to the remote (origin or other).squash your commits on the feature_branch.It is used before pulling requests or merging feature branches. With the help of squashing you can clean your branch history and can maintain an organized commit timeline. ![]() Git pull is a synonym for git fetch & git merge so your version will git fetch twice, although the second time it likely won't fetch anything, so it probably doesn't matter. Discuss Pre-requisite: Git Squashing combines multiple commits into a single commit based on your commit history. Git checkout master & git fetch & git pull ![]()
0 Comments
Leave a Reply. |