Delete histor origin gitkraken12/21/2023 By default pull will use merge strategy if there's difference between remote and local branches ![]() Git pull -ff-only - to pull remote branches. git flow) - messy history is often a result of messy dev flowĮnsure everyone in the team is comfortable with git (better git-cli) Some additional advices from my experience: Very important subject! Thank you for the article! If you need me to explain it please let me know. This is a little bit tricky, see how REBASE work here. As rebase creates "new commits" than you feature branch, if you team mate has pulled his work from your /feature branch he might have conflicts when he will merge to /dev branch (MAYBE).This is not THE SOLUTION, sometimes you need to keep track of an old branch, i don't know maybe you need to see when a feature branch was started and finished/merged, it depends of your needs, you should ask yourself do i need to see this branch in my history ? is it meaningful ? YES/NO ?.Ok rebase, needs a little more steps compared to merge, but this was useful to me, i can improve tests and avoid bugs.merge, as your /feature is directly following the HEAD of dev branch, you branch will merge without creating "new merge commit" (see first GIF).rebase on top of /dev branch (for example): now /feature is updated too and ready to test.update (pull from origin) the target branch (dev).Mix branches in order to get linear history needs to following next steps Gitlab/Github merges configuration (default -no-ff ? ).Is the target branch ahead (more changes) ?.You commits are directly following the origin branch ? So GIT will create a linear history without creating a "new merge commit", just by mixing and move HEAD pointer. I will write another post about that soon. You can also see that the messages are clean. I don't know exactly which internal rules or tools they use to get this.īut this is a example of what i prefer to see in my projects. □ Do i really need to see old branches ? Maybe not it depends Linear history works well to me, this is one solution. SO you are polluting the branch with unnecessary commits and potentially creating bugs if you don't see/test before. Ok There is some bugs? I can revert BUT you will create another commit on dev. ![]()
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |