![]() ![]() Once you are sure you are on your local branch, push your branch using git push -set-upstream origin. To start a pull request, you need to push your local branch to the remote Git repository.įirst, make sure you are on your local branch by using git status When you write code and push commits on your branch, these changes are only stored on your local computer. I generally add the suffix -partX when I need to make a follow-on code review.įor example, the branch julien/FBAR-123-part2 is a follow-up of the work done in branch julien/FBAR-123. Sometimes you need to make a follow-up for a task. The branch name will then be julien/FBAR-123. What is common in many large tech companies is to use your login and the issue identifier you are working on.įor example, imagine that my username is julien and the issue identifier I am working on is FBAR-123. There is no established convention and you need to define your own. If you do not establish conventions, you end up with multiple branches with similar names (e.g. When developing code with multiple developers, it's important to agree on conventions to name branches. When you want to see the difference between your branch, you can simply use the following command COPY git diff origin/main # Create a new branch based on the current version of the default branch. # Pull the latest changes from the default branch git pull COPY # Switch to the default branch (name is either main or master) git checkout main To start a new branch, make sure you have the latest version of the main branch and branch from it. At this phase, developers make sure the code is correct and ready to be merged and used by all other developers! It occurs when the branch is still active and before merging the branch into the defeault branch. Note that this step is optional.Ī Code Review (or Pull Request or Merge Request) is when the code is reviewed before being merged. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |