0

I have a git commit questions. We are three developers usually working on sprint environment. Attached is a screenshot of our commits look like.

Usually we will create a feature/Jira-1212_ticket_name and work on it. Then commit and do a PR that one of the others will review , then either approve or work more.

Finally all these feature branches get merged to develop branch as you can see.

However, it gets really like a snake. Is there a way to make it cleaner?

enter image description here

Hello Universe
  • 3,248
  • 7
  • 50
  • 86
  • Uhm. I find this pretty clean. It's easy to follow branch and merge points and if your commit messages are good, I don't see an issue. – musiKk Sep 16 '15 at 08:43

1 Answers1

4

You can use git rebase which is illustrated here: What's the difference between 'git merge' and 'git rebase'?

If you always rebase (e.g. by git pull --rebase) you can get a linear history. Some people prefer this, others think it's worse. Up to you.

Community
  • 1
  • 1
John Zwinck
  • 239,568
  • 38
  • 324
  • 436
  • Usually I will create a feature branch and do git pull --rebase on that feature branch. Since we do the git pull on bitbucket, we use the bitbucket approve/merge functionality. That does merge of the branch to the develop branch. Are you suggesting merging locally and then push? – Hello Universe Sep 16 '15 at 04:36
  • Yes I think that's right, you can rebase locally and then push. – John Zwinck Sep 16 '15 at 04:53