Questions tagged [git]

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

Filter by
Sorted by
Tagged with
406 votes
8 answers
455k views

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 ...
user avatar
  • 4,415
305 votes
10 answers
41k views

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 ...
user avatar
303 votes
14 answers
43k views

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 ...
user avatar
  • 4,639
300 votes
20 answers
112k views

What does SVN do better than Git? [closed]

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 ...
281 votes
6 answers
75k views

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 ...
user avatar
  • 2,921
273 votes
6 answers
155k views

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: ...
user avatar
255 votes
10 answers
129k views

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 ...
user avatar
  • 9,251
231 votes
15 answers
44k views

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 ...
user avatar
  • 2,499
203 votes
9 answers
50k views

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 ...
182 votes
4 answers
48k views

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 <files> git commit The first step places revisions into what's called a "staging area" or "index". What I'm ...
user avatar
  • 2,301
181 votes
2 answers
208k views

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 ...
user avatar
  • 2,379
150 votes
9 answers
22k views

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 ...
user avatar
  • 1,537
144 votes
1 answer
14k views

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 ...
user avatar
143 votes
6 answers
138k views

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 ...
user avatar
  • 1,533
136 votes
6 answers
72k views

The trend of the "develop" branch going away

I've noticed something lately looking at some popular projects on GitHub, that there's no develop branch. And in fact, the GitHub Flow guide doesn't mention it either. From my understanding, master ...
user avatar
  • 1,501
129 votes
23 answers
32k views

Why did Git get so much hype? ...while others don't? [closed]

In the recent years, the hype around Git raised greatly. Everybody knows about Git, nobody knows about alternatives. Other ones like Mercurial seem to be unnoticed. Both have been released in 2005, ...
127 votes
11 answers
20k views

How can I minimize git pain when everybody is working on master?

Our documentation team of about ten people recently moved from SVN to Git. In SVN, everybody worked on master -- a model I've always hated, but I wasn't able to bring about that change. As part of ...
user avatar
126 votes
7 answers
54k views

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 ...
user avatar
  • 1,451
120 votes
7 answers
20k views

My office wants infinite branch merges as policy; what other options do we have?

My office is trying to figure out how we handle branch splits and merges, and we've run into a big problem. Our issue is with long-term sidebranches -- the kind where you've got a few people working ...
user avatar
  • 1,310
116 votes
10 answers
19k views

My coworker commits and pushes without testing

When my coworker thinks that there is no need for a test on his PC, he makes changes, commits and then pushes. Then he tests on the production server and realizes that he made a mistake. It happens ...
user avatar
  • 1,201
112 votes
14 answers
19k views

How can I maintain code quality without SCM?

I am working in a governmental institution. The technology being used here and the methods for developing software are quite old fashioned. They have tons of storage space but no appropriate space ...
user avatar
  • 1,011
107 votes
1 answer
21k views

If I fork a project on Github that is licensed under MIT, how do I handle the attribution and copyright notice?

If I plan to fork an MIT project and significantly modify and rename it, how do I handle the copyright notice above the MIT license on the main License file. Would I list the original author and my ...
user avatar
  • 1,799
91 votes
11 answers
28k views

git for personal (one-man) projects. Overkill?

I know, and use, two version control systems: Subversion and git. Subversion, as of now, gets used for personal projects where I am the only developer and git gets used for open source projects and ...
user avatar
  • 11.1k
91 votes
8 answers
164k views

Using multiple Git repositories instead of a single one containing many apps from different teams? [duplicate]

I am migrating a 10-years-old big CVS repository to Git. It seemed obvious to split this multiple-projects repository into several Git ones. But the decision-makers are used to CVS, therefore their ...
user avatar
  • 1,146
89 votes
11 answers
44k views

Why learn git when there are GUI apps for GitHub?

Given that GitHub provides GUI apps for both Mac and Windows, what are the benefits of learning to use git from the command line? Currently I'm using their mac app to update my repositories, and so ...
user avatar
  • 1,063
89 votes
10 answers
20k views

Why is the sudden increase in number of Git submitters on Debian popcon graph in 2010-01?

Almost every article I've read 1 comparing Git and Mercurial it seems like Mercurial has a better command line UX with each command being limited to one idea only (unlike say git checkout). But at ...
86 votes
6 answers
16k views

Why does git use hashes instead of revision numbers?

I always wondered why git prefers hashes over revision numbers. Revision numbers are much clearer and easier to refer to (in my opinion): There is a difference between telling someone to take a look ...
user avatar
  • 1,039
83 votes
9 answers
71k views

Should Git be used for documentation and project management? Should the code be in a separate repository?

I'm starting up a Git repository for a group project. Does it make sense to store documents in the same Git repository as code - it seems like this conflicts with the nature of the git revision flow. ...
user avatar
80 votes
7 answers
19k views

Why do so many projects prefer "git rebase" over "git merge"?

One of the advantages of using a DVCS is the edit-commit-merge workflow (over edit-merge-commit often enforced by a CVCS). Allowing each unique change to be recorded in the repository independent of ...
user avatar
80 votes
3 answers
43k views

Should we include the NuGet PACKAGE folder in version control?

In a C# or VB.NET project, should we include the PACKAGE folder (NuGet package folder that is created in the root of my project that contains the nupkg files and other content) to our source control ...
user avatar
80 votes
8 answers
29k views

Is it a good practice to use branches to maintain different editions of the same software?

We have a product that has a few different editions. The differences are minor: different strings here and there, very little additional logic in one, very little difference in logic in the other. ...
user avatar
78 votes
4 answers
63k views

Are there any statistics that show the popularity of Git versus SVN? [closed]

I'm writing an essay, and would like to have some empiric evidence, perhaps longitudinal data where the popularity of these technologies is compared over a period of some years. Are there any ...
user avatar
  • 1,025
76 votes
4 answers
14k views

Why does git pull perform a merge instead of a rebase by default?

Consider the following situation: You have a clone of a git repository You have some local commits (commits that have not yet been pushed anywhere) The remote repository has new commits that you have ...
user avatar
  • 5,269
70 votes
17 answers
15k views

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

Context My team of 8 engineers is currently transitioning to Git (from Subversion) for our next big thing. We have a handful of 'more experienced' engineers that are finding it quite difficult to ...
user avatar
  • 718
68 votes
8 answers
14k views

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

I have been studying the best practices for a code review, and I was wondering what to do in the following scenario: During a code review, I see potential improvements, but decide that they are ...
user avatar
  • 807
67 votes
1 answer
27k views

Gerrit code review, or Github's fork and pull model?

I am starting a software project that will be team AND community developed. I was previously sold on gerrit, but now Github's fork and pull request model seem to almost provide more tools, ways to ...
user avatar
65 votes
2 answers
62k views

Summarize changes (insertions and deletions) in Git [closed]

I want to look at how my code base has grown over time. GitHub has a nice +/- display along the list of checkins which gives a sense of this. Is there something similar I can use with my Google Code ...
user avatar
65 votes
5 answers
34k views

As a sole developer (for now), how should I be using Git?

I have multiple projects on Git that I eventually want to bring others into. However, right now it's just me and I use Git and GitHub very simplistically: no branches and basically just using the ...
user avatar
64 votes
3 answers
28k views

Can a git commit have more than 2 parents?

In this documentation it is mentioned A commit object may have any number of parents. But from my understanding, the only case where a commit will have more than 1 parent is when a merge has ...
user avatar
  • 1,081
63 votes
4 answers
35k views

Is backing up a MySQL database in Git a good idea?

I am trying to improve the backup situation for my application. I have a Django application and MySQL database. I read an article suggesting backing up the database in Git. On the one hand I like it,...
user avatar
  • 1,794
61 votes
11 answers
8k views

Should a git commit message mention the file that was modified?

In the first line of a git commit message I have a habit of mentioning the file that modified if a change doesn't span multiple files, for example: Add [somefunc] to [somefile] Is this a good thing ...
user avatar
  • 1,144
59 votes
4 answers
9k views

What happens if a feature merged into develop is postponed by management?

We recently had a problem whereby a feature for our webapp (automatic signup) was postponed by management because they felt the start was too "cold" but they wanted all the other features we had been ...
user avatar
59 votes
2 answers
16k views

Are Git branches, in fact, "homeomorphic endofunctors mapping submanifolds of a Hilbert space"?

As we all know: Git gets easier once you understand branches are homeomorphic endofunctors mapping submanifolds of a Hilbert space Which seems like jargon, but on the other hand, All told, a ...
user avatar
  • 4,847
58 votes
8 answers
10k views

Do seasoned developers still have to deal with merge conflicts?

I am still a software engineer in training, but I have heard the following adage multiple times: Good coders don't have to deal with merge conflicts. Whenever I work on a project with others, I'm ...
user avatar
  • 723
58 votes
3 answers
9k views

If GitHub interacts with Git, and Git is licensed under GPLv2, shouldn't GitHub be open source?

Since Git is licensed under GPLv2, and, to my understanding, GitHub interacts with Git, shouldn't the whole GitHub codebase be open-sourced in a GPL-compatible license?
user avatar
57 votes
8 answers
11k views

Should generated documentation be stored in a Git repository?

When you use tools like jsdocs, it generates static HTML files and its styles in your codebase based on the comments in your code. Should these files be checked into the Git repository or should they ...
user avatar
57 votes
3 answers
42k views

Reusing a merged branch, good practice?

Currently, I used to create a new branch each time I have to add a new feature to my application. When my feature is finished and functional, I merge it with the master branch. But later, when I ...
user avatar
  • 723
52 votes
4 answers
47k views

Appropriate Git workflow for multiple active releases while handling hotfixes

I'm trying to choose a Git workflow that is most appropriate for our product. Here are the parameters: We do a few major releases a year, let's say 10 at the most We have multiple versions of our ...
user avatar
  • 946
52 votes
5 answers
13k views

Organizing Git repositories with common nested sub-modules

I'm a big fan of Git sub-modules. I like to be able to track a dependency along with its version, so that you can roll-back to a previous version of your project and have the corresponding version of ...
user avatar
51 votes
4 answers
40k views

How does one handle sensitive data when using Github and Heroku?

I am not yet accustomed with the way Git works (And wonder if someone besides Linus is ;)). If you use Heroku to host you application, you need to have your code checked in a Git repo. If you work on ...
user avatar

1
2 3 4 5
23