![]() ![]() Even a single person may want to base his next task on the previous one, while waiting for code review comments. still polishing, testing), but they shouldn’t wait. Sometimes tasks are not split that strictly and have dependencies – you write a piece of functionality, which you then realize should be used by your teammates who work on another task within the same story/feature. Why would anyone be based on your work-in-progress branch? Because it happens.THe “distributed” allows for working offline, or even without a central repo (if it goes down), but it is not the major benefit of git. I think basically you have to push right before you log off, or even more often. Why do you need to push if something isn’t ready? Isn’t it the point of the “D” in “DVCS” to be able to commit locally and push only when ready? Well, even if you don’t use git as SVN, there are still plenty of use-cases for pushing every change to your own feature branch remote – you may be working from different machines, a colleague may want to pick up where you left (before leaving for holiday or falling sick), or even hard drive failures and theft.Two questions that you are already asking: And force-pushing may make it very hard for people that are based on your branch. If you do that before rebasing, you’d always need to force-push. ![]() In short, by default rebasing seems not to favour pushing stuff to the central repo. ![]() I recently asked a practical question about a rebase workflow. While you can get tons of results discussing rebasing vs merging, including the official git documentation, it has become more of a philosophical debate, rather than a practical one. This is all decided by each team, but I’d like to focus on one very debated topic – rebasing vs merging. Do you push or stay local? Do you use it like SVN (perfectly fine for a single developer on a pet project), or you delve into more “arcane” features like -force-with-lease. Do you branch off branches? Do you branch off other people’s branches, which are work-in-progress. The workflows differ mostly in the way you organize you branches and the way you merge them. And then on the client side you can use the command line, IDE integration, or stand-alone clients like SourceTree. You can use vanilla-git, you can use GitHub, BitBucket, GitLab, Stash. The workflows vary depending on the size of the team, organization, and on the way of working – is it distributed, is it sprint-based, is it a company, or an open-source project, where a maintainer approves pull requests. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |