Skip to main content
New
Stack Overflow Jobs powered by Indeed: A job site that puts thousands of tech jobs at your fingertips (U.S. only). Search jobs
158 votes
Accepted

What can I do for developers who can't learn Git?

Give them a toy. Git is hard. Especially if you've been doing source control in a different paradigm. I broke the build the first time I tried to work with git. It made me so paranoid that I didn't ...
candied_orange's user avatar
83 votes
Accepted

In code review, should I ask to do a refactor outside of the scope in a pull request?

There are several relevant trade-offs here: Review complexity. If a branch has more than one functional change commit or more than one refactoring commit it becomes time-consuming to review the ...
l0b0's user avatar
  • 11.5k
66 votes
Accepted

Where does refactoring belong in GitFlow branch naming model?

Refactoring work should go in a feature branch. The prefix "feature" is just a word to describe a discrete programming task, you could choose any word you like, any branch from development is either ...
Ewan's user avatar
  • 76.3k
54 votes
Accepted

Why deploy to the development environment?

You deploy to dev because you can't actually do real integration testing without actually really running the code. You can call the environment something else like Staging, but if it's the lowest non-...
Ryathal's user avatar
  • 13.4k
48 votes

In GitHub flow, is it OK to base feature branch on another feature branch?

Here is the workflow that I follow when I branch from a feature branch: Create feature-branch-B from feature-branch-A Work on feature-branch-B If more commits are added to feature-branch-A after ...
geoji's user avatar
  • 581
32 votes

What can I do for developers who can't learn Git?

The average dev doesn't need a lot of git's goodies. It's a distributed source control system but most teams will use it with a central canonical repo to push and pull from. The core commands that ...
ratchet freak's user avatar
29 votes
Accepted

Should I use git stash to save ongoing changes of my project and push it to github to access in other computers?

I've simply committed unfinished (and messy) states of my code before (and pushed it) only for the purpose of pulling that in the other computer to continue the work. I am pretty sure this a bad ...
Greg Burghardt's user avatar
28 votes
Accepted

Should a release branch or the master branch be tagged when the gitflow is used?

Firstly, you can't tag branches, you can only tag commits. You should tag the commit you actually release. That's the point of version-tagging commits. If you have an issue with your software in ...
mrr's user avatar
  • 919
28 votes

What can I do for developers who can't learn Git?

Have them use a Git UI. If they have experience with TortoiseSVN, TortoiseGit (Windows only) works almost exactly the same. Otherwise, SourceTree (Windows+Mac) is wonderful - we have multiple non-...
BlueRaja - Danny Pflughoeft's user avatar
28 votes

In code review, should I ask to do a refactor outside of the scope in a pull request?

Just nitpicking, but usually I try to do the refactor before the change: Commit 1: Refactored class hierarchy in preparation for feature XY-123 Commit 2: Implemented feature XY-123 Another one I ...
Hermine's user avatar
  • 289
27 votes

Where should QA team do the testing in Gitflow branching model

QA should probably be testing twice. The first testing should be around the specific changes and done on the feature branch. This lets QA test around the specific changes and see that the particular ...
Thomas Owens's user avatar
  • 82.8k
27 votes

What can I do for developers who can't learn Git?

This answer tries to address how to get senior programmers interested in git, not about how to learn git the quickest way - for that, the excellent git book is great, or any amount of tutorials (=> ...
AnoE's user avatar
  • 5,843
23 votes
Accepted

Is cherry-picking commits into master (instead of merging) a good idea?

Cherry picking commits is useful when you need a specific change in multiple branches where merging other history is not desirable. This is a specific workflow outside of merging, because combining ...
Greg Burghardt's user avatar
18 votes
Accepted

Where do bugfixes go in the git-flow model?

The short answer: Yes, branches for bug fixes that are going into a planned upcoming release should be in feature branches. How you name feature branches or these branches for bug fixes is up to you ...
Thomas Owens's user avatar
  • 82.8k
16 votes

In code review, should I ask to do a refactor outside of the scope in a pull request?

For me, it depends on if the main change is difficult to follow without the refactor. If it is difficult to follow, I'll ask for the refactor to be done as part of the pull request, in the interest of ...
Karl Bielefeldt's user avatar
15 votes

In git, is it a bad idea to create a tag with the same name as a deleted branch?

You can explicitly specify whether you want a branch or a tag by using full name: git checkout refs/heads/v1.5.2 or git checkout refs/tags/v1.5.2
mastahu's user avatar
  • 151
15 votes

What can I do for developers who can't learn Git?

I would like to refer you to this blog entry by Joel Spolsky. The reason you're seeing for these junior developers picking it up quickly is very likely because they do not have a predetermined notion ...
Robzor's user avatar
  • 888
15 votes
Accepted

How to maintain development,testing and production branches when the number of devs is around 50?

Your problems have existed for decades and people have realized that there isn't a good way to solve it without significantly altering their way of working. Thats where Trunk-based Development, ...
Euphoric's user avatar
  • 37.4k
14 votes

Why deploy to the development environment?

Often, the tests that are run as part of a build are done in a clean environment. The build server establishes a new database, and the tests are responsible for seeding the necessary data for test ...
Thomas Owens's user avatar
  • 82.8k
12 votes

Where should QA team do the testing in Gitflow branching model

Great question. I don't think there is an 'official' correct answer to this. It depends on how fast you can test. The essential problem is that each merge, compilation or even deployment, can ...
Ewan's user avatar
  • 76.3k
11 votes

What can I do for developers who can't learn Git?

I found stackoverflow very helpful while I was first picking up Git terminology. Questions like these ones were really useful for me (mostly because of their conciseness) and I kept them open in tabs ...
SBaker's user avatar
  • 219
11 votes

What can I do for developers who can't learn Git?

Git is a major rethink if you learned how to do source control on SVN. Many of the habits you developed there (which may have well been best practice for SVN) will misguide you when using git. This is ...
jpmc26's user avatar
  • 5,409
11 votes

Strategy for dealing with A/B tests and Gitflow

The way I've always seen it done is to have a single code base capable of serving both pages/views/forms. ie. Its Feature flagged and deployed with two or more configs, or the 'does the user get A or ...
Ewan's user avatar
  • 76.3k
11 votes
Accepted

Git-flow: How to create a hotfix release when there are future releases?

You don't want to inject these commits on master between the commits and tags for 1.2 and 1.3. Although you can rebase, introducing commits like this is a form of rewriting history and could introduce ...
Thomas Owens's user avatar
  • 82.8k
10 votes
Accepted

How does one name branches that are bug fixes for a release branch in git-flow?

From your update you're asking about a release that has not been deployed to prod. I'm assuming that means that you haven't merged to master or tagged the commit yet. In git-flow, you would fix any ...
Samuel's user avatar
  • 9,197
9 votes

What can I do for developers who can't learn Git?

Buy them a book Honestly, I fell squarely in the camp you describe. I came from a background of SourceSafe and ClearCase. At first, Git was completely inscrutable to me, despite my boss walking ...
Reginald Blue's user avatar
9 votes
Accepted

Is there a recommended Git branch strategy for two products in the same repo?

The recommended strategy is "don't do it". The cleanest way to do this with git is to have three repos: Project A Project B Common libraries And then use git submodule(documentation here) to have ...
frollo's user avatar
  • 214
9 votes

What is the difference between trunk based development and gitflow?

On a "mechanical" level, you seem to understand both version control strategies and their branching models. I believe there is a philosophical component that you are missing. The main ...
Greg Burghardt's user avatar
9 votes

How to maintain development,testing and production branches when the number of devs is around 50?

Excellent answer by Euphoric here, but let me add another (additional) option, which also means a significant change to your current way of working: try to break down your product into individual, ...
Doc Brown's user avatar
  • 208k
8 votes

Where do bugfixes go in the git-flow model?

If its a single commit then just make a well identified commit and push it on top of the development branch, else create a feature branch. There is also a comment from the git-flow author saying ...
Deb's user avatar
  • 287

Only top scored, non community-wiki answers of a minimum length are eligible