![]() $ git rev-parse -abbrev-ref HEAD # will output the current branch This is the solution I would like to cover for now. ![]() using git merge, which brings the changes from one branch into another.using git rebase, which is a little more complicated, and that allows you to rewrite git history.If/when someone accepts the pull request and chooses to click on the ‘Merge Pull Request’ button, they are merging your changes back into the main branch (actually you can do a Pull Request for any branch, but that’s a minor detail).īut you can make your changes into another branch using only git, without any Pull Request or any other GitHub features: Can you have a look, and if they are ok integrate them into the main branch?’. Pull Requests are a concept introduced by GitHub, that basically tells other developers ‘Here are my changes. ![]() The easiest solution is to use Pull Requests (if you are using GitHub or Bitbucket, or merge requests if you are using GitLab). Now that you know how to work on independent branches you should be asking yourself ‘But how do I bring my changes from one branch into another?’. In order to create a new branch you just need to type: All of this without any complicated technique. With branches, you can be working on some feature, be alerted by an ultra urgent production bug, change branch, do a quick fix, and go back to your feature work. BranchesĪs I already said, branches are one of git core features, and the git branching mechanism is one of it’s strongest adoption points. This and other log filters are very well described on this Atlassian git log tutorial. This is specially useful if you use a development and a master branch and you want to see what is not yet in production for instance.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |