Questions tagged [git]
Git is an open-source DVCS (Distributed Version Control System)
1,119
questions
2
votes
3
answers
156
views
Static types and dependencies in trunk-based development
There're certain things in code that can't be conditional. Two very common examples:
static types
dependencies.
You can't naturally enable/disable a feature that implies a new dependency or a new ...
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.
...
-4
votes
1
answer
46
views
How can I use data from another remote repository without including it in my repository?
I currently have a CI workflow for tests that use data present in my repository. However, since this data is very large, I would like to move it to another remote repo and somehow give my CI tests ...
-3
votes
0
answers
78
views
Git semantic commit messages but the repo is declarative infrastructure as code
According to the informal git semantic commit specs anything is not a new feature impacting users is a chore.
What happens if the repo only contains configuration info, like the company's ...
0
votes
1
answer
23
views
Possible to create a git repo that will comprised of files residing in NFS and files in a system directory?
I want to create a git repo that will include scripts in /nfsdrive/sbin/ and the services that activate these scripts—which reside in /etc/init.d/.
I've searched the documentation and the relevant ...
3
votes
1
answer
158
views
I need help understanding a seemingly broken Git release flow
First some context. Working in teams which use a CI environment, many people will know the typical Gitflow release process.
Without going into too much political detail, the company I currently work ...
-2
votes
1
answer
84
views
How to organise the correct handling of versions of binaries
I'm currently working in a firm, based on an executable, who uses different DLLs. There are several issues:
Everybody builds the binaries on his own PC.
The executables (*.exe and *.dll files) are ...
0
votes
1
answer
164
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 ...
0
votes
2
answers
76
views
Version control for modification of a part of another project used in my project
There is somebody else's project (A), a part of which (foo.h) I want to use in my project (B) with some modifications. The modifications make sense only in the context of B, so I can copy foo.h into B ...
25
votes
9
answers
10k
views
Using Git in Enterprise environment [closed]
Git is an excellent version control system. If we exclude the fact that, it doesn't have an excellent GUI support, it's really good and fast. But the source controls like Clearcase has large support ...
0
votes
0
answers
38
views
How to properly follow a forked git repository?
We have to fork a repository and keep it up to date, with adding changes here and there. The important branches are remote/1.0 and remote/1.1
The workflow currently used is to fork the repository, ...
-1
votes
1
answer
100
views
Git Workflow for Code without any regression test
So I have a project which does not have any regression test or automated unit tests. We release every week. We use forking git flow which is basically everyone forks repo and pushes their changes in ...
12
votes
2
answers
5k
views
Is it a good idea to manage a group of repo microservices as submodules of a master repo?
At the moment of writing I have let's say 4 micro services interoperating in order to build a bigger system.
Every microservice has its own repo.
What I'm thinking is that it would be useful to have ...
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 ...
5
votes
1
answer
1k
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 ...
3
votes
2
answers
146
views
Best practice for storing third party tools
Currently my company is storing the installers (and in some cases the installed directory copy) for some open source third party tools that our build uses. Were storing these files in our github repo ...
0
votes
1
answer
113
views
How to improve my current development/release process
I'm looking for suggestions on how to modernise my development/release practices by potentially introducing some automation. I'll outline the current process to help explain why I'm currently ...
0
votes
1
answer
97
views
Aiding code review with an additional pull request
I am curious how others tackle the issue of needing small, sometimes trivial changes in a pull-request. The problem crops up a lot where I work. A developer completes a task and makes a pull-request, ...
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:
...
3
votes
2
answers
237
views
How to keep attribution in version control (git) when one author moves another author's code?
Sometimes code will need to be moved. A common example is some logic that exists in a controller needs to get moved to a helper class so it can be called from outside of that controller. So someone ...
-2
votes
1
answer
84
views
How to handle dependencies between branches in git-flow?
I've been working on feature_A while another dev works on feature_B. Now, the other dev needs a small functionallity that's implemented in my feature_A, but I've not finished the whole feature itself. ...
2
votes
0
answers
173
views
Better alternative for cherry picking across heavily diverged branches
I'm currently trying to update the linux kernel used in a xilinx SoC, my company has an internal repo/fork of xilinx open source linux with a bunch of kernel drivers for our custom hardware & ...
0
votes
1
answer
42
views
To update or not to update author dates
How often should we do git comit --amend --date=now [target] especially when editing a commit while rebasing or doing a fixup? If the answer is always, is it OK to let existing commits that follow ...
2
votes
1
answer
742
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 ...
1
vote
2
answers
155
views
Workflow for splitting large pull request into multiple reviews
Nobody wants to review a large PR from one go. The issue is to split a (relatively large) feature into multiple smaller PRs. The rules of the game are
This is a single feature, which cannot be ...
10
votes
7
answers
8k
views
What is the best way to record in git which commit is currently deployed to which environment?
We run a deployment pipeline where we build a versioned binary, tag the commit it was built from with the same version as the binary, and then can deploy the binary into arbitrary environments (...
8
votes
4
answers
10k
views
Can you close branches in Git?
In Mercurial you can close a branch like this: hg commit --close-branch, this means the the branch will not be listed anymore but will still exist, and can still be listed if you use hg branches --...
0
votes
1
answer
80
views
Package management & DTAP: how to keep overview?
We have an application which contains of multiple composer packages.
A default structure of the site is:
src/
application/
vendor/
vendorname/
framework/
filemanagement/
...
Each package has its ...
0
votes
2
answers
122
views
Issue key in every commit message? [closed]
Feature branch names already contain the issue key (ticket number). Should commit messages also contain them?
Pro:
easy to see where a commit belongs to.
better for third-party software tracking ...
0
votes
4
answers
417
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 ...
0
votes
0
answers
71
views
Keeping a fork of a repository up-to-date with upstream changes
I have a repository, which is a fork of a public project. The fork contains several additional commits with custom features - nothing fancy. Recently, I have been wondering what would be the best ...
8
votes
3
answers
1k
views
Should I gitignore env files in my private repo?
I have some .env files for my backend application and the usual recommendation is to put all .env files in gitignore to not share it in the repo and use something like Github Secrets to store the .env ...
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 ...
1
vote
2
answers
130
views
Where to put technical updates in git branching flow?
From time to time you need to do technical updates, like:
Update versions of your dependencies
Update the version of your parent POM, you build tool etc.
Leave out those updates that have a firm ...
7
votes
3
answers
706
views
Git philosophy: public vs. personal files: is there hybrid versioning?
I often find myself puzzled with such a questioning. I need to version my projects for two reasons:
publish source code with its whole history so that people will be able to get into it, explore it ...
9
votes
3
answers
4k
views
How to deal with merging of Visual Studio projects
Visual studio projects, as opposed to makefiles or other projects I know, have some quirks:
The directory structure of the project has no real connection to actual directory structure - all ...
3
votes
4
answers
296
views
Git: Best practices for using updates from one branch in another
My team is working on building a bunch of automated tests for our project. Each automated test targets a "customization" our client ordered to modify an existing website.
The current flow is:...
30
votes
5
answers
24k
views
When should we clean up old, no longer used GIT branches?
We have several bugfix branches that are starting to pile up. They have been merged into master, and deployed to production.
Is there a good benchmark for when these branches should be cleaned up? ...
1
vote
5
answers
847
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 ...
0
votes
1
answer
160
views
Git workflow for multiple releases with external dependencies
I'm working on a project (A development accelerator) which had dependencies with a 3rd party NuGet package for a CMS application. The external NuGet package has some breaking code changes to our ...
3
votes
1
answer
161
views
how to easily merge future updates after cherry picking commits. - Or merge a specific commit first?
A particularly nasty bug just happened to our software. (JS/react something was preventing onclick from firing about half the time - turned out a constant rerender was happening). This wasn't really ...
3
votes
2
answers
137
views
Best way to sync work on a repo between different remote machines
I have multiple VMs set up that have the same repo and with slight differences. I use these VMs to prototype or run different experiments. Sometimes I sync or merge between them and from different ...
2
votes
4
answers
462
views
If PRs are not being approved, when do you stop branching off of master?
I prefer to create linear git history, which can be fast-forward merged. This was a technical requirement at my previous job, which used BitBucket and required all PRs to be fast-forward-able. We had ...
-2
votes
4
answers
298
views
How can I use git effectively when I'm just starting a project and working on many parts at once?
I've been having the problem that at the beginning of a new project, I'm likely to switch frequently between tasks in a way that (to me) doesn't seem very conducive to small single-concern commits. ...
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 ...
0
votes
2
answers
2k
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.
...
0
votes
1
answer
1k
views
Appropriate naming for (GitHub) repositories belonging to the same project [closed]
I have some issues selecting an appropriate naming scheme for GitHub repositories that belong to the same project. The main package repo relies on additional repos to generate documentation or run ...
1
vote
3
answers
377
views
Storing different configuration for the same application in a repository
I just wonder how do you deal with this scenario. Let's say you have an application that uses configuration files that are loaded right after the application starts. Configuration files store - lets ...
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 ...
10
votes
5
answers
12k
views
How to evaluate moving to Team Foundation Server
My development team presently uses the following software in our workflow:
JIRA
Bamboo (Atlassian continuous integration)
Greenhopper (Atlassian agile project management)
Confluence
Git, hosted on ...