Questions tagged [git]

Git is an open-source DVCS (Distributed Version Control System)

Git is an open-source DVCS (Distributed Version Control System). Originally produced by Linus Torvalds to manage the Linux kernel codebase, its streamlined design, speed, and flexibility have turned it into one of the most popular version systems.

References

  1. Stack Overflow git tag wiki
  2. Git home page
  3. Git Linux manual
  4. Git @wikipedia
1154 questions
416
votes
8 answers

What does 'stage' mean in git?

I find git hard to understand as I could not find the meaning of the words used for the actions. I have checked the dictionary for the meaning of 'stage' and none of the meanings were related to source control concepts. What does 'stage' mean in the…
000
  • 4,525
  • 4
  • 16
  • 16
308
votes
16 answers

Why does everyone use Git in a centralized manner?

I have used Git at my past two companies for version control. It seems from what I've heard that about 90% of companies use Git over other version control systems. One of the biggest selling points of Git is that it is decentralized, i.e. all…
gardenhead
  • 4,719
  • 2
  • 19
  • 24
307
votes
10 answers

I'm a Subversion geek, why should I consider or not consider Mercurial or Git or any other DVCS?

I try to understand the benefits of distributed version control system (DVCS). I found Subversion Re-education and this article by Martin Fowler very useful. Mercurial and others DVCS promote a new way of working on code with changesets and local…
user2567
301
votes
20 answers

What does SVN do better than Git?

No question that the majority of debates over programmer tools distill to either personal choice (by the user) or design emphasis, that is, optimizing design according to particular uses cases (by the tool builder). Text editors are probably the…
doug
  • 568
  • 2
  • 5
  • 12
298
votes
6 answers

Why squash git commits for pull requests?

Why does every serious Github repo I do pull requests for want me to squash my commits into a single commit? I thought the git log was there so you could inspect all your history and see exactly what changes happened where, but squashing it pulls it…
hamstar
  • 3,091
  • 2
  • 11
  • 6
282
votes
6 answers

Choosing between Single or multiple projects in a git repository?

In a git environment, where we have modularized most projects, we're facing the one project per repository or multiple projects per repository design issue. Let's consider a modularized project: myProject/ +-- gui +-- core +-- api +--…
Johan Sjöberg
  • 3,007
  • 4
  • 16
  • 7
266
votes
10 answers

Should images be stored in a git repository?

For a distributed team that uses Git and GitHub as version control, should images also be stored in the git repository? The images in question are small/medium-sized web-friendly images. For the most part, the images won't be changed. The folder…
spong
  • 9,361
  • 6
  • 44
  • 58
233
votes
15 answers

New developer can't keep up with branch merges

I am the new developer - this is my first programming position. My issue is this: We use git - I cut a branch from our develop branch, then I start working on the minor task I've been assigned. It's very slow, because I'm inexperienced. By the time…
K--
  • 2,529
  • 3
  • 10
  • 12
203
votes
9 answers

Why is Mercurial considered to be easier than Git?

When looking at comparisons, it seems to me that there could be a 1:1 mapping between their feature sets. Yet, an often cited statement is that "Mercurial is easier". What is the basis of this statement? (if any)
Tamás Szelei
  • 7,737
  • 7
  • 38
  • 42
184
votes
2 answers

Git branching and tagging best practices

I am currently learning to use Git by reading Pro Git. Right now I'm learning about branching and tags. My question is when should I use a branch and when should I use a tag? For example, say I create a branch for version 1.1 of a project. When I…
Code-Guru
  • 2,419
  • 3
  • 16
  • 17
183
votes
4 answers

What is the benefit of git's two-stage commit process (staging)?

I'm learning git and I've noticed that it has a two-step commit process: git add git commit The first step places revisions into what's called a "staging area" or "index". What I'm interested in is why this design decision is made, and…
thomasrutter
  • 2,311
  • 3
  • 16
  • 13
149
votes
9 answers

Maintain hundreds of customized branches over master branch

Currently we have one master branch for our PHP application in a shared repository. We have more than 500 clients who are subscribers of our software, most of whom have some customization for different purposes, each in a separate branch. The…
Fernando Tan
  • 1,527
  • 2
  • 11
  • 9
149
votes
1 answer

What are the advantages and disadvantages of cryptographically signing commits and tags in Git?

So someone peer reviewed my work, and he told me that I should always sign my commits and tags cryptographically. When asked why, he didn't know to explain it to me, and said "It's just a good thing to do". Trying to avoid an obvious chimpanzee…
Madara's Ghost
  • 8,787
  • 9
  • 25
  • 33
147
votes
7 answers

Working on a branch with a dependence on another branch that is being reviewed

How does git help deal with the scenario below: I have a task broken down into 2 parts: backend task and frontend task. I make a pull request to merge the backend changes and wait for it to be merged (and address feedback). While waiting, I can't…
sul4bh
  • 1,661
  • 2
  • 11
  • 11
145
votes
6 answers

How do you achieve a numeric versioning scheme with Git?

My organization is considering moving from SVN to Git. One argument against moving is as follows: How do we do versioning? We have an SDK distribution based on the NetBeans Platform. As the SVN revisions are simple numbers we can use them to extend…
Erlend
  • 1,553
  • 3
  • 10
  • 6
1
2 3
76 77