Questions tagged [git]

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

Filter by
Sorted by
Tagged with
13 votes
2 answers
17k views

Should frontend and backend be on separate GitHub repos?

We are new to git, but this fundamental question needs to be sorted out before we can begin. It's two devs who have been working standalone for a while. Now the time has come to adopt git (at the ...
0 votes
2 answers
131 views

Is a 'base' file always necessary when doing a merge?

Are there any algorithms that can do or suggest merges without requiring the "base" file, the most recent common ancestor of the two file versions that we want to merge? Is a manual merge ...
0 votes
2 answers
656 views

Why is master branch important in GitHub flow?

First let me phrase my understanding of GitHub flow before asking the question: In GitHub flow, we have a main branch, and feature/topic/bugfix/whatever branches branching off that main branch. Once ...
1 vote
3 answers
180 views

Low maintenance approach to handling versioning and git

What is a good way of handling version bumps in git history? The best approach that I've found so far is something like this: Version is specified in one of the source files (e.g. Python's __version__)...
4 votes
5 answers
4k views

How to properly manage bugfixes for released versions in git flow

We follow git flow, see https://nvie.com/posts/a-successful-git-branching-model/ Lets imagine the following situation: We have a current version 2.0.8 on our prod environment. After a while, several ...
-3 votes
0 answers
26 views

How do you set up a Go repo to use a private repo in the most convenient way? [closed]

We wish to decrease the amount of duplicate code in our organization, and part of that is to move functionality into separate private repos on github. We onboard new people, and use a number of ...
0 votes
4 answers
645 views

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

Currently my code base has 3 deployments, development : where devs unit test and develop features, testing : where testers run end user verification for the features and production : the deployment ...
-1 votes
3 answers
734 views

How to proper deal with fixed bugs in feature branches

It could sound trivial, maybe it is. I have a new feature branch (say newfeaturebranch, branched from develop), but during the development a new bug is found and fixed in develop. The bug is found to ...
127 votes
11 answers
21k 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 ...
3 votes
2 answers
284 views

How to gain confidence during a large, complex merge?

I recently finished a large merge with many complex conflicts that needed to be resolved. The branches had been separate from one another for several months while different teams contributed to each ...
26 votes
5 answers
8k views

What to do about large svn history when moving to git?

Edit: unlike some similar questions such as Moving a multi-GB SVN repo to Git or Managing large binary files with Git My scenario doesn't involve several subprojects that can be easily converted into ...
0 votes
1 answer
284 views

Managing Documentation / Source Control for a Full-Stack Application Across Multiple Repos

TL;DR I have a moderately sized/complexity web application (Angular 11) in one repo and a standalone REST API (.NET Core 3 / C#) in another repo, and am trying to figure out the most efficient way to ...
5 votes
1 answer
2k views

Project structure with git submodules with common dependencies

I have two (and more in the future) Python projects that I'd like to package into a global package in order to import its modules and use them in another external projects in the future. This is how ...
16 votes
10 answers
3k views

Looking for some alternative branching strategies to meet my team's needs

I've recently joined a new company and they've been experiencing some issues related to their branching strategy which causes untested code to be released inadvertently. We have three branches of ...
0 votes
1 answer
59 views

Where to keep assets for documentation generation as to not clutter the main repository

I have a large C++ project I'm hoping to release publicly soon (it is currently an internal development at work). We have a large auto documentation setup which uses doxygen and sphinx, however our ...
2 votes
0 answers
265 views

Justification for different code bases on different branches in the same repo?

Branches in git repos or similar are practically always derived from the same code base; after all, they're usually merged back in to master later. But, if you wanted your open source project on ...
6 votes
4 answers
788 views

Performance implications of a game project monorepo on *modern* Git

First off please note, I’m fully aware that Git has historically been terrible at dealing with large binary files and very large repos; there are at least a dozen questions on SO that deal with large ...
308 votes
16 answers
45k 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 ...
1 vote
4 answers
521 views

Understanding whether 'rebase' can be used in a team environment?

I'm new to Git, having worked with TFS for nearly 20 years, and I'm currently trying to get my head around "rebase". I broadly understand what it's doing, but there are a couple of caveats/...
2 votes
4 answers
800 views

How do you deploy and test a hotfix repo branch in different environments, Git Flow variants

I have done thru where do bug fixes go in git flow and the git flow and github flow pages. There are scenarios many times when we need to show demo of new functionality and on same day fix issues of ...
0 votes
2 answers
108 views

Workflow for Writing Database Migrations for a Team

I am wondering what some possible workflows are for writing database migrations for a team of developers. We seem to run into a problem where one person writes a migration, names it and gives it a ...
-1 votes
2 answers
905 views

Can I split a feature branch and then merge it back to the origin master branch without any issues?

I'm working on a project where the master branch is protected. Usual workflow: Always create feature branches off master and then send PRs. Once that has been merged into origin/master, I can pull it ...
4 votes
3 answers
3k views

What is the difference between trunk based development and gitflow?

I've been searching the internet and I can't find a good question to this so I believe I have a fundamental misunderstanding on what they are. Is the only difference that in gitflow there is a release ...
5 votes
1 answer
700 views

Does it matter which branch I push to?

My question is around how branch pushes work exactly; I have come across something that doesn't make logical sense to me and as such would like an explanation as to why I am experiencing this ...
14 votes
4 answers
8k views

How can we keep track of which version of our code is in each environment?

My team currently uses a fairly simple branching/deployment process that looks like this: ┌────────┐ ┌────┐ ┌──────┐ Environments: │ DEV │ │ QA │ │ PROD │ └───────...
14 votes
2 answers
11k views

Is it bad practice to create a git tag for every successful continous deployed build?

Currently we are using a tag for every build on master which passes CI. This leads to a lot of tags (3-10 per day). The good side is, that those commits are easily human readable, show the version (v....
45 votes
5 answers
6k views

Should a github maintainer rewrite author's in pull requests?

I'm not a programmer by profession, but I do some coding and have used github some. I've run across what I find to be a surprising situation. I'm very familiar with git. There is a project which I ...
2 votes
3 answers
2k views

GIT: Why use master (or any branch) as to reflect what's in production

We're having a debate here on our server development team, and I'm struggling. I've always used master as source of record for production, with the master branch (or some designated release branch) ...
2 votes
2 answers
315 views

How can I make sure that only thoroughly tested changes make it into the master branch in git, without cherry picking commits from development?

We have two main branches here, master and development, and feature/bugfix branches come off of development. The issue we're having here is that we can't just merge development into master when doing ...
11 votes
3 answers
2k views

What is the recommended way to separate current development from maintenance development in version control software?

I have some software application managed using Git. I just released a new version 2.x which I plan to maintain on the long term (bug fixes mostly). In the meantime, I would like to start working on ...
33 votes
3 answers
11k views

Is a merging strategy like Git Flow really an anti-pattern?

My company is using Git, and is using a peculiar branching scheme - work is done in master, and branches are reserved for releases. This works fine, so long as all of the work done in an iteration ...
6 votes
2 answers
346 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?
8 votes
2 answers
366 views

Tool to identify potential reviewers for a proposed change

Is there a tool that takes as input a proposed patch and a git repository, and identifies the developers are the best candidates for reviewing the patch? It would use the git history to identify the ...
8 votes
2 answers
2k 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-...
27 votes
5 answers
34k views

Having a production branch or using master?

I work on small team with other remote developers on a Rails application. We are starting to modify our git workflow. We have thought about a branching structure like below: (dev) -> (qa) -> (...
13 votes
3 answers
1k views

What causes the "git rainbow"?

Sometimes when working with other developers with git version control I run into a problem where the git graph suddenly spawns countless parallels lines like in this image. Image from here. I have ...
81 votes
5 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 ...
2 votes
3 answers
296 views

How do I manage a development journal?

I am working solo on small development projects on my own time, using Git. For each project, I like to have a development journal which is associated with that project and not associated with other ...
0 votes
3 answers
346 views

Is there any advantage of pushing branches to GitHub without an associated PR?

I work with other Software Engineers on a web app product. Also, the source code is hosted on GitHub. There is a behavior pattern that I do not understand. Some co-workers push branches (adding ...
0 votes
4 answers
600 views

Rewind commits to new branch in git

I have three branch on my git tree. master contains validated source version, develop contains staging versions, then I have some feature branches. For now, I have the current strucutre; The numbers ...
5 votes
3 answers
4k views

What is the point to namespaces in branches in git?

So I mainly use Mercurial for my projects and I decided to sit down and learn all Git's shenanigans to discover if I'm in the right side (at least for me). I'm learning that git uses namespaces for ...
65 votes
5 answers
36k 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,...
2 votes
4 answers
2k views

It is good practice for each project (within a directory) to be split out into its own repository?

I am new to Git and am learning as much as I can about it. The latest thing I would like to know is how to approach this problem: I have a single folder (R) that I initially set up as a Git ...
5 votes
2 answers
8k views

How do you use external libraries in git?

SFML, in this case, has a Git repo and a download page. Until now I have always downloaded from the download page, which came (at least for the compiler I use) with .a and .hpp files and could easily ...
268 votes
10 answers
143k 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 ...
7 votes
4 answers
451 views

How to collaboratively resolve conflicts in Git?

We are working on a big feature, because we don't know how to make it any smaller. I got to a point, when I need to merge my changes from our feature branch into develop branch (we're using Git Flow), ...
2 votes
2 answers
875 views

Branching strategy for multiple team working on same repository

I am trying to come up with a branching strategy. We have two teams working on the same product which is kept in one repository. Both teams have different release plans and if both teams merge on ...
0 votes
1 answer
141 views

Where should research and production code reside in git?

We have research code that consists of Jupyter notebooks and large data files. At the same time, we also have production code that consists of Python source and CloudFormation templates. There is ...
1 vote
2 answers
1k views

Rewriting software - clone or create new repo

I have a working web app that I version control using Git - call this v1.0. I learnt a lot during that development including some of the mistakes I made. I now want to re-write parts of the code to ...
-1 votes
2 answers
3k views

Git Branching Convention : Baseline from Dev or Master

When creating a new feature branch should I baseline from master branch or dev branch and why? I'm used to creating a branch from master as the baseline, making my changes and merging it back into dev ...

1
2 3 4 5
24