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

learn more… | top users | synonyms

0
votes
0answers
14 views

Use git to keep repository of small unrelated applications

I find myself writing small test cases and applications to post bug cases, answer questions in some forums, make feature showcases for clients, etc. and for that I created a TestCases project inside ...
3
votes
2answers
253 views

Why does Git's stash commit need two parents?

Why does Git's stash commit need two parents? In the Hacker's Guide to Git, I see this mental model for stashes: The guide tells me that stash@{0} needs both A and B as parents. Why? Why doesn't ...
33
votes
5answers
7k 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 ...
54
votes
4answers
26k views

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

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 ...
5
votes
4answers
330 views

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

We use GitHub Flow in our project and most of the time, we open a new feature branch from master, do some work there, open a PR, review the code and merge back into master. However, my current work ...
0
votes
0answers
32 views

How can I include common strings (regexes) in several projects written in different languages?

I have a simple Go library (~300 lines, mostly type declarations and nice methods and compatibility methods for gomobile etc., also pretty-printing scripts). The heart of the whole project are two ...
1
vote
1answer
34 views

Frontend end UI Library using multiple repos for multiple clients

I've just inherited a HTML/CSS based internal UI library, which the place I work is planning to use to standardize CSS styles for all of its products across the board, mainly webapps. The library has ...
-2
votes
0answers
47 views

how to handle conflicts in git in text files?

We started getting a lot of conflicts lately almost exclusively caused by a single file where almost everyone adds a few lines with each commit. Every time, git detects that the same lines are ...
2
votes
1answer
191 views

Fork Management of Git Multi-level Hierarchies

We have the following Git hierarchy structure in place, where each child is forked from the parent. If we build something in Client1 that will be useful in the entire hierarchy, what is the best way ...
-1
votes
0answers
28 views

GIT, Docker and CI - How to do it effectively

Here is my current workflow... Note: This is all about the workflow. I use AppVeyor as a build server but it could be Jenkins or Teamcity or whatever. I am using Azure for the Cloud but it could be ...
-2
votes
1answer
77 views

Git Repository design questions

I have following hierarchy of topics I am working on DataStructure Linked List Array Stacks Tree Enterprise Apps EJB JMS Android App Games Productivity Apps My question is how can I best ...
0
votes
1answer
82 views

Why does git branch workflow merge into the production branch

I am wondering why every git workflow merge develop into the production branch. Is there any reason why we cannot just leave the old production branches and create new ones from develop (in case we ...
1
vote
1answer
27 views

In gitlab, should we close a merged MR?

In gitlab, there is Merge Requests (MR) like in github there is Pull Requests (PR). If the MR is rejected, sure, we close it. But what if the MR is merged ? In that case the button to close the MR ...
0
votes
0answers
47 views

rebase equivalent - update specific branch?

If I reach the point where I am updating my local master: git checkout master git fetch upstream # I am pulling changes from develop branch into my local master git merge upstream/develop After ...
5
votes
1answer
166 views

Why is it more unsafe to store your password in the URL of a git repo?

As a comment on a response to this question, someone says: It is not advisable to put the password in the URL for this file is saved on the .git/config . Is not safe, it is better to use ssh key ...
17
votes
3answers
796 views

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

I very often work on some features of my project that I need to take a break before it is good enough for a commit. However, I use daily two different computers to code (my laptop and my research lab ...
0
votes
1answer
59 views

Tracking number of code lines added/removed by me

I do like to write code, but what I like even more is to remove code! Following the mantra "code that does not exist cannot have bugs", if we can accomplish the same result with less code, we will ...
6
votes
1answer
606 views

Visual Studio, Git, and common code

I'm looking for some advice on how I should arrange a large new project I'm working on to allow it be more easily managed in Git (using GitLab), and developed in Visual Studio. To give an idea of ...
0
votes
0answers
3 views

Git Remove Submodule From Repo [migrated]

I had originally created a repo that was deep inside my file structure. I forgot I had done this, went to the top of my file structure and created a repo of all the files in the web root. Git made ...
3
votes
2answers
211 views

Types of version control systems

On the topic of Git; are there other types of version control systems? other than Local VCS, Centralized VCS and Distributed VCS stated in here?
1
vote
2answers
119 views

Github Parent commit committed after child commit?

I'm looking at this commit which was committed "26 days ago" and the parent commit which was committed "25 days ago". How can the parent commit be committed one day later than the child commit?
10
votes
0answers
3k views

Copying a git repository to USB drive [migrated]

I am working on an Open Source project and I have a git repo on my machine with all the code. The repo is kind of big, and I would like to keep working on it while I do not have access to my computer. ...
2
votes
2answers
90 views

How do I manage a major overhaul of an open-source project with git?

I have a somewhat popular open-source project on Github, and I'm getting ready to do a major overhaul - completely different directory structure, substantially different versions of major components, ...
1
vote
2answers
135 views

Git - single or multiple branch

I am working on this project of mine where I am the only developer. I have chosen git for the version control for the project. Currently, I work from multiple systems and commit to the master branch ...
0
votes
1answer
68 views

GitFlow, should my release branch include minor version number?

I've found it difficult to find a definitive answer to this question. Using Semantic Versioning and GitFlow should my release branch include the minor version number? I'm not referring to tags. My ...
6
votes
3answers
247 views

When to commit work in git?

When I'm working on a project, I tend to write a lot of code. A lot of code means alot of bugs. If I commit my work early on , I have to edit that commit when I encounter a bug and fix it. This is why ...
1
vote
1answer
53 views

How do I organize my project to accomodate GIT pull requests for source installed via PIP?

I want to structure my Python project in a manner such that others can use a package manager (PIP) to easily clone the environment for team development, and GIT to contribute to the project, plus a ...
2
votes
1answer
134 views

Use git to manage different deployments of the same repo

I have a web application built in PHP. I want to use Git to manage the different aspects of the deployment. Some of the files in the web app are specific to a client (logos, database connection ...
8
votes
3answers
313 views

How can I group commits in a version control system such as git

Instead of a one long flat commit history, why isn't there a hierarchy, so at the top level you might have pull requests, then you could go down a level and look at the commits in that PR. I realise ...
0
votes
0answers
54 views

Is this a useful analogy between the blockchain and Git?

I am trying to understand the concept of the blockchain (the supporting structure behind bitcoins). To this end I am playing with an analogy between it and Git. My question is, if this is a valid/...
3
votes
2answers
625 views

Commit projects individually or whole solution?

I am working (alone) on an application that is a music portal where you can search for artists, songs etc ... The C# solution consists of: a class library that contains all the stuff to access the ...
-3
votes
1answer
95 views

According to GNOME guidelines, should git messages end with a full stop, or not? [closed]

According to GNOME guidelines, how sentences should be written in Git messages? Should sentence in git commit message start with upper-case letter and end with a full stop, or lower-case without a ...
16
votes
4answers
5k views

github team workflow - to fork or not?

We're a small team of web developers currently using subversion but soon we're making a switch to github. I'm looking at different types of github workflows, and we're not sure if the whole forking ...
4
votes
2answers
145 views

Should I have a 'dev' branch separate from a 'production' branch?

I recently set up my staging and production server environments on Heroku and everything is working great. Through Heroku, you can deploy from a Git branch - e.g. master or my-feature. This got me ...
44
votes
8answers
4k 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 ...
1
vote
2answers
63 views

Installing multiple versions of software with git

I'm really struggling to understand git, so here's a tighter rephrasing of a previous question I had asked. I'm going to explain a hypothetical scenario, detailing what I think happens when you ...
0
votes
0answers
51 views

Which git branches should I tag?

I read this nice post: Git branching and tagging best practices I really like the NVIE git branching model and I try to use something very similar: http://nvie.com/posts/a-successful-git-branching-...
52
votes
1answer
3k 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 ...
5
votes
3answers
729 views

Moving from a CVCS to a DVCS in a big company, what is the right way to do it?

I just started a new job and I'm currently at the process of trying to introduce a DVCS (mercurial, but the actual DVCS is not really a matter of discussion at this point, it could also be git) to the ...
5
votes
0answers
82 views

Are there any other Git porcelains other than the default one? [closed]

One of Linus's emails mentions the separation of the Git tools into the "plumbing" (usable by automated tools) and a user-friendly interface on top of the that (which has later come to be referred as ...
17
votes
5answers
6k views

Why do git commits not contain the name of the branch they were created on?

When working with git in a team using feature branches, I often find it difficult to understand the branch structure in history. Example: Let's say there was a feature branch feature/make-coffee, ...
0
votes
0answers
88 views

Is updating a remote-tracking branch by local branch a good practice?

In Pro Git you can see: Remote-tracking branches are references to the state of remote branches. They’re local references that you can’t move; they’re moved automatically for you whenever you ...
0
votes
2answers
106 views

git clone vs cp -R

I want to use an existing project as a starting point for a new project by copying or cloning it. There are at least two ways of doing this. Method 1: Copy it. cp -R /path/to/source /path/to/dest ...
13
votes
2answers
671 views

Where to push a failing test?

I just changed branch settings on my GitHub repository, so that my [next] branch requires a passing CI build through a pull request. A discussion followed with a number of team members, about failing ...
1
vote
3answers
144 views

Git: how to test local code before commit

Let's say I have two files I am working on - "a.txt" and "b.txt". I need to commit my change to "b.txt" but want to keep working on "a.txt" for some more time. I do a "git add b.txt". Now, before I ...
115
votes
8answers
82k 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 ...
4
votes
1answer
186 views

small team git workflow

I want to ask if the following workflow is correct! It is referring to a small private team. There is a master branch where no one merges there ( except the maintainer ), a development branch and ...
2
votes
0answers
72 views

Implementing redundant GIT backup scheme

I want to push a local repo to multiple remote GIT repositories to achieve redundancy in my backup scheme. So, let's say I plan to use Github and BitBucket to host my repositories. I have two ...
6
votes
1answer
122 views

Why can't Pull Requests be seriously implemented in Mercurial?

A week ago, I was at LFNW and as I was talking with Larry Hastings after his talk, he said (paraphrased): There's something in Git that makes the Pull Request workflow possible that isn't there in ...
0
votes
1answer
33 views

Sharing Project configuration files for an application with Qt IDE using Cmake and sharing via Git?

Imagine that you are starting to work in a project with a group of people. You want to share your code and the full configuration files of CMake, Qt IDE configuration. So you if you want to test or ...