Git workflow used in Taraba Tech

21.10.2022.

1 min reading

author: Milomir Dragović

Git workflow used in Taraba Tech
  1. Create a branch on Gitlab.

  2. git pull
  3. git checkout <branchname>
  4. Add only files that make up a small and coherent change

    git add <file1> <file2> ...
  5. Start an editor which lets you separate the commit message subject from the body.

    git commit
  6. Update your feature branch with the latest changes from the master by interactive rebase.

    git rebase -i master
  7. If you don’t have conflicts, skip this step. If you have conflicts, resolve them and continue rebase.

    git add <file1> <file2> ...
    
    git rebase --continue
  8. Push your branch.

    git push

    If you change git history on your feature branch you may need to use the -f or --force flag.

  9. Make a Merge Request. Assign peer reviewer.

  10. Merge request will be accepted, merged and closed by a reviewer.

  11. Remove your local feature branch if you're done.

    git branch -d <branchname>

     

Clap if you like this post

10

Share with your friends

Similar posts