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

learn more… | top users | synonyms

16
votes
4answers
3k views

Workflow: Using binary document formats in Git without locks (moving from subversion)

We're a software consultancy with a multitude of projects for different customers. We traditionally use Subversion, but are currently considering moving to Git. A significant portion of the documents ...
22
votes
1answer
1k 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 ...
2
votes
1answer
72 views

Structuring git repository as a 'catch-all'

I have a really old install of Debian on my Thinkpad, and I want to refresh it now that I'm using it again. However, I have a LOT of old scripts all over this install for beauty fixes, shortcuts, and ...
0
votes
2answers
1k views

Correct way to undo the past few git commits including a merge? [closed]

My team is working with git for the first time and has really messed up our git remote due to our inexperience. I'm trying to help educate them on git to solve the problem in the long term, but in the ...
15
votes
4answers
7k views

How can I organize personal git repositories?

I'm in the process of setting up a GitHub account with the plan of making a pair of libraries I developed as parts of some recent iOS projects freely available for other iOS devs to use. I don't ...
4
votes
3answers
111 views

Feature branch which never made it into develop

I am cleaning up our git repository and there is a feature branch which contains a prototype of an interesting feature which the management decided not to include soon in the product. What do you do ...
2
votes
3answers
259 views

Handling “backup” files with Git

I have a project folder that has multiple duplicate files that are named slightly differently to create "backups". So I have "file1.txt" and "file1 backup.txt". Is there a preferred method to capture ...
4
votes
3answers
79 views

Using a git repository as the base of a new project

If I want to use for example the Electron Quick Start as the base of a new app, should I use a normal clone and just delete the .git folder, or is there a more elegant way of doing it?
22
votes
4answers
7k views

code review with git-flow and github

With regular git and github I can do a code review by simply creating a pull request of the feature branch I'm working on to the master branch. How would I do code reviews with git-flow? With workflow ...
1
vote
1answer
61 views

Suggestions: Good format for short/commit messages for User Story and Sub tasks

I would like your opinion regarding a good style/format for short messages when committing into a repository (GIT or SVN). Considering we are using a feature branch development approach, with one ...
0
votes
1answer
404 views

Recommendations to organize code changes in GIT

I'm looking for an advice reflecting my point of view. First, I will explain my point of view. My point of view I'm working in a big company as a C++ developer, we are using GIT. I'm going to make a ...
17
votes
2answers
300 views

Optimize a git repo, containing large binary files

Our project is about 11GB, 10 of which are binary data (.png images). Consequently, a git diff or git status operations take up more than a minute. Fortunately all data files are separated into a ...
2
votes
2answers
205 views

Is it wrong to git push force branches?

When I'm working on a feature branch, I tend to want to cleanup the commits in the branch using an interactive rebase before my work is reviewed and integrated in the main branch. During development ...
3
votes
1answer
126 views

Best ways to manage my Git repositories with projects sharing the same code [duplicate]

My background: I was programming for many years, but have never used a version control system. I felt, that such a system would save me a lot of time and allow me to be more productive, but I never ...
23
votes
6answers
576 views

Splitting coding progress into meaningful commits without too much overhead

When working on a fix or a feature, I sometimes stumble over other tiny issues that can be improved on the fly in a matter of seconds. When I do them immediatly and then commit the finished feature/...
0
votes
0answers
79 views

What is a good directory structure for projects with versioned code but huge data files

We work with genomics and imaging data. Our data are large, but our code is small. We sometimes work on code collaboratively, and also wish to share it with the researchers we do analysis for. We are ...
26
votes
5answers
1k 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 ...
-2
votes
1answer
38 views

Handle multiple parallel wide modifications using branching in VCS

Here, the term of branch is understood as a git branch. I don't know how branch works in other VCS, but its probably VCS-agnostic. Given a branch base, and around it many other "satellites" branches, ...
19
votes
4answers
19k views

Keeping git repositories on different hosts in sync

I am thinking about starting a small project and I want to make its versioning with git. Bitbucket seems a good option for me with their free plan. I want to use it as the main tool for working with ...
15
votes
2answers
2k views

Is the git “Golden Rule of Rebasing” so essential?

I had a discussion recently with people absolutely opposed to a rebase strategy of feature branches on GIT. It seems to be an accepted pattern to use rebase only for local, private branches but never ...
10
votes
3answers
1k views

Why doesn't git merge adjacent lines without conflict?

I recently learned that when merging two branches in git, if there are changes on two adjacent lines git declares this a conflict. For example, if file test.txt has this content: Line 1: A Line 2: B ...
11
votes
4answers
731 views

How to “start over” in GitHub?

I plan a complete rewrite of my project, using another framework etc. It would be nice to keep the old code including history for reference. What is the best way to do this, in order to avoid risk, ...
3
votes
2answers
257 views

Docker, microservices and git workflow

We are a young company that's developing a web app in node.js with the microservice architecture. Actual development workflow: Each microservice is stored in a private repository Different ...
2
votes
1answer
55 views

Workflow and process when branches have dependencies in git for code reviews

A fairly common workflow for working with git is: Fork master Make changes/add functionality in branch Make pull request for your branch vs master Merge pull request (after code review, automated ...
7
votes
3answers
3k 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 ...
1
vote
1answer
75 views

Best practices for working with public_html folders and git

Currently, everything that is in the public_html folder automatically gets published live. The git repository is also inited in this folder (though this can change if it's necessary). What is a good ...
1
vote
2answers
102 views

Best practice for creating defined versions in git

In my company we have a 'production pipeline', which is a bunch of code which we use to produce data, with the data later shipped to customers. The code is still being developed, bugs get fixed etc. ...
15
votes
7answers
742 views

Why not commit unresolved changes?

In a traditional VCS, I can understand why you would not commit unresolved files because you could break the build. However, I don't understand why you shouldn't commit unresolved files in a DVCS (...
8
votes
3answers
305 views

Accidentally including unrelated changes in commits

My personal approach to a git commit is that every commit should include a unit of change, in its completness. When I develop, I usually focus on such units. But sometimes, my attention strays ...
5
votes
3answers
291 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 ...
4
votes
1answer
1k views

Why aren't there cherry-pick requests?

One disadvantage to pull requests (aka merge requests) is lots and lots of merge commits. It's not the worst thing, but it does clutter the commit logs, and make for lots of unnecessary non-...
2
votes
2answers
106 views

Pull requests and work item linking in Visual Studio 2015 with non-TFS remote Git repo

We use TFS and Visual Studio 2015 at work but don't get full benefit from the ALM features as we have code in non-TFS Git repos. We would like to integrate these products in with all the TFS goodies ...
3
votes
1answer
129 views

Should we use a monorepo?

My team is planning a migration from subversion to git. We support 3 applications... 1 is primarily for internal users, 1 is for corporate "partners" and 1 is for end users. These applications share ...
4
votes
2answers
207 views

merge vs rebase pull requests on github

I am actively working on a two person project with very few longstanding feature branches (longest existing branch is 3 weeks). I have spent the afternoon trying to understand merge vs rebase and ...
140
votes
5answers
55k 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: ...
114
votes
10answers
46k 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? For the most part, the images won't be changed. The folder containing them will ...
6
votes
1answer
105 views

Why use a dedicated “pushbot” user which automatically merges approved pull requests?

Most Github repositories I'm aware of use the following workflow for pull requests: one or several users with "contributor" privilege review the suggested changes and then one of them merges the pull ...
0
votes
1answer
70 views

Managing a project on github in different repos or one? [duplicate]

An app I am working on (iOS) is being distributed to different businesses and each business needs a few customizations to said app before it is distributed to users on the app store. Most files will ...
12
votes
3answers
2k views

Branching breaks continous integration?

I think this article, A Successful Git Branching Model, is very well known among experienced DVCS users. I use hg mostly, but I would argue this discussion is fine for any DVCS. Our current ...
0
votes
1answer
149 views

Uploading Processing Sketch with library to github

I have a sketch I wrote in the language Processing that I want to put up on GitHub. It uses a library released under LGPL so from what I understand, I'm able to (and should) upload the library ...
1
vote
0answers
70 views

Multiple git committers on same repo and machine with forwarding agent

I have a remote machine where multiple developers work on the same repository. We use gitolite and SSH keys to manage git access. As for now we code on the local machines, commit, push, pull remotely ...
10
votes
2answers
15k views

Best way to structure a Git repository for Maven

I need some advice on how to structure our projects in Git. We use Java and Maven is our build tool. Maven kinda assumes all of your projects have a common ancestor eventually. Maven can also be a ...
6
votes
4answers
241 views

Is there any downside to commit messages containing the ticket number

I was wondering if it would be good practice for commit messages to contain the ticket number they were apart of. It would be like 2568 Fix heating issue Summary of the issue with a bunch ...
1
vote
1answer
129 views

Development workflow for a team: local to live (with GIT)

We're trying to put together a workflow for Wordpress development which turns out to be pretty complicated with lots of elements. Is there a way to streamline this or filling in the gaps? We ...
2
votes
0answers
212 views

Combining GitHub and TFS / Visual Studio Team Services

I wonder if it's possible to combine Visual Studio Team Services and/or TFS with a GitHub repository. We think both products have their own advantages and would like to work on one repo within our ...
1
vote
1answer
127 views

More than one deployable git branch

My dilemma is about the GIT flow. Let's assume that I have an application that can be deployed differently (staging release, QA release, production release). Since the application has profiles to be ...
0
votes
1answer
190 views

Git Bisect found the buggy commit. Now what?

I've seen blog posts explaining how to do Git bisect, but how to you fix the bug, commit again and maintain the rest of the commit history? An actual problem I faced in my project was like this (the ...
3
votes
1answer
61 views

Isn't the master branch just a surrogate of tagging in the gitflow model?

Reading the gitflow model, it seems to me that the master branch is there only to provide a branch where to store stable versions. What does that add to just tagging develop with the stable versions?
4
votes
1answer
76 views

Do feature fixes need to be local only?

From this blog post describing the git-flow model, it seems that feature branches have to remain local to the user working on them and are actually deleted right before pushing to origin. This kind ...
1
vote
0answers
74 views

Where do bugfixes go in the git-flow model?

In the, commonly referred to as, Git-flow model hotfixes go in their specific hotfix-* branch and small integration fixes right before release go in the release-* branch. General bugfixes from the ...