[all] - git: prevent unnecessary merge commits?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[all] - git: prevent unnecessary merge commits?

Pascal Schumacher
Hello everybody,

in my opinion it is a good practice to always use the "--rebase" option
when using "git pull". This keeps the history free of unnecessary merge
commits like "Merge branch 'master' of
https://git-wip-us.apache.org/repo...".

You can also tell git to automatically rebase when pulling:

git config --global pull.rebase true

What do you think?

Cheers,

Pascal


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [all] - git: prevent unnecessary merge commits?

Bruno P. Kinoshita-3
Hi Pascal,

Apache OpenNLP uses that approach whenever possible (http://opennlp.apache.org/using-git.html). I like the way the commit tree looks after a while. Sometimes it's not practical, especially when receiving patches from external contributors (developers can still check-out code locally and squash commits & rebase, but sometimes it can get messy and take much longer).

I'm +1 for recommending this as a good practice. In my workflow I normally `fetch` + `rebase`, instead of `pull`.

Cheers,
Bruno




________________________________
From: Pascal Schumacher <[hidden email]>
To: Commons Developers List <[hidden email]>
Sent: Saturday, 9 June 2018 8:53 PM
Subject: [all] - git: prevent unnecessary merge commits?



Hello everybody,


in my opinion it is a good practice to always use the "--rebase" option

when using "git pull". This keeps the history free of unnecessary merge

commits like "Merge branch 'master' of

https://git-wip-us.apache.org/repo...".


You can also tell git to automatically rebase when pulling:


git config --global pull.rebase true


What do you think?


Cheers,


Pascal



---------------------------------------------------------------------

To unsubscribe, e-mail: [hidden email]

For additional commands, e-mail: [hidden email]

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [all] - git: prevent unnecessary merge commits?

Adam Soroka
+1. Unless there is a specific reason to incur a merge commit, it's generally noise.

ajs6f

> On Jun 9, 2018, at 5:03 AM, Bruno P. Kinoshita <[hidden email]> wrote:
>
> Hi Pascal,
>
> Apache OpenNLP uses that approach whenever possible (http://opennlp.apache.org/using-git.html). I like the way the commit tree looks after a while. Sometimes it's not practical, especially when receiving patches from external contributors (developers can still check-out code locally and squash commits & rebase, but sometimes it can get messy and take much longer).
>
> I'm +1 for recommending this as a good practice. In my workflow I normally `fetch` + `rebase`, instead of `pull`.
>
> Cheers,
> Bruno
>
>
>
>
> ________________________________
> From: Pascal Schumacher <[hidden email]>
> To: Commons Developers List <[hidden email]>
> Sent: Saturday, 9 June 2018 8:53 PM
> Subject: [all] - git: prevent unnecessary merge commits?
>
>
>
> Hello everybody,
>
>
> in my opinion it is a good practice to always use the "--rebase" option
>
> when using "git pull". This keeps the history free of unnecessary merge
>
> commits like "Merge branch 'master' of
>
> https://git-wip-us.apache.org/repo...".
>
>
> You can also tell git to automatically rebase when pulling:
>
>
> git config --global pull.rebase true
>
>
> What do you think?
>
>
> Cheers,
>
>
> Pascal
>
>
>
> ---------------------------------------------------------------------
>
> To unsubscribe, e-mail: [hidden email]
>
> For additional commands, e-mail: [hidden email]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [all] - git: prevent unnecessary merge commits?

Emmanuel Bourg-3
In reply to this post by Pascal Schumacher
+1, I prefer linear commit histories too.

Emmanuel Bourg

Le 09/06/2018 à 10:53, Pascal Schumacher a écrit :

> Hello everybody,
>
> in my opinion it is a good practice to always use the "--rebase" option
> when using "git pull". This keeps the history free of unnecessary merge
> commits like "Merge branch 'master' of
> https://git-wip-us.apache.org/repo...".
>
> You can also tell git to automatically rebase when pulling:
>
> git config --global pull.rebase true
>
> What do you think?
>
> Cheers,
>
> Pascal
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [all] - git: prevent unnecessary merge commits?

Bernd Eckenfels
+1 linear commits and branch.autosetuprebase always

Gruss
Bernd
--
http://bernd.eckenfels.net
________________________________
From: Emmanuel Bourg <[hidden email]>
Sent: Saturday, June 9, 2018 11:54:01 PM
To: Commons Developers List
Subject: Re: [all] - git: prevent unnecessary merge commits?

+1, I prefer linear commit histories too.

Emmanuel Bourg

Le 09/06/2018 à 10:53, Pascal Schumacher a écrit :

> Hello everybody,
>
> in my opinion it is a good practice to always use the "--rebase" option
> when using "git pull". This keeps the history free of unnecessary merge
> commits like "Merge branch 'master' of
> https://git-wip-us.apache.org/repo...".
>
> You can also tell git to automatically rebase when pulling:
>
> git config --global pull.rebase true
>
> What do you think?
>
> Cheers,
>
> Pascal
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]