Questions tagged [git]
Git is an open-source DVCS (Distributed Version Control System)
1,156
questions
0
votes
2
answers
135
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 ...
-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
651
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 ...
3
votes
2
answers
285
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 ...
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 ...
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/...
0
votes
2
answers
109
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 ...
2
votes
4
answers
802
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 ...
7
votes
4
answers
452
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
883
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
142
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
3
answers
166
views
What approach should I use for auditing config changes to achieve similar functions as Git blame?
We are storing our configuration files in S3. Each file is a JSON file. When config changes, the old file is backed up and a new file replaces it. These happen behind a service, where it also ...
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
1
answer
98
views
What is the correct way to deal with Pull Request updates concerning an interface with a Continuous Integration script: rebase or merge?
I work with other Software Engineers on a web app product. Also, the source code is hosted on GitHub.
Recently, there was an introduction of a Continuous Integration procedure enabled by a script ...
0
votes
2
answers
119
views
A feature branch on top of another feature branch (dealing with PRs)
As shown in the following image, I have two different branches with their corresponding PRs (PR1 and PR2). The top arrow is the develop branch.
PR2 is build on top of PR1. PR1 is build on top of ...
0
votes
2
answers
217
views
If "others have modified components since you checked out the system", what would you do?
In Software Engineering by Pressman:
The steps in continuous integration are:
Check out the mainline system from the version management system into the developer's private workspace.
Build the ...
-1
votes
2
answers
89
views
Template Source Control Repository
What is the best practice, for creating a template repository, and then creating n projects based on that template?
With "template" I mean: Let's say the template site is x. So x is a site ...
1
vote
1
answer
807
views
Branching strategy for developing multiple features at the same time
We are doing a mobile app development and currently, we have Dev - UAT - Stating - Main branches.
We branch from the Main branch as feature/fA for feature development.
Do our development in that ...
0
votes
0
answers
71
views
GitLab repo architecture checks: on server or in CI?
I am currently seeking a solution to run sanity tests on my GitLab repos architecture. There are more than 20 repos in a GitLab group.
My idea is to create a "Health Check Repo" (HCR) that ...
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 ...
2
votes
3
answers
260
views
How to maintain multiple release branches simulateously (git)
This question has probably been discussed to death, but I don't feel like I have a good answer. I work at a company where customers are on different versions of our product. When a bug is found, we ...
4
votes
1
answer
292
views
How to label backwards incompatible changes which change the API but don't add a feature?
I have a project in which I'm the sole contributor, there isn't a stable API yet and I'm constantly refactoring code, but I still try to denote breaking changes whenever they do happen. Recently ...
1
vote
0
answers
33
views
When implementing Branch For Release in Trunk Based Development how should version info be updated? [duplicate]
I am currently implementing a Trunk Based Development workflow utilizing Short Lived Feature Branches in a project I am working on. Recently I have realized my release strategy is less than optimal, ...
0
votes
1
answer
621
views
Should tags be introduced on commits still in Pull Request branches outside of main/master branch?
Context: I am working on a project in which people use tags on commits yet in branches waiting on the Pull Requests queue of GitHub. This means they are non-merged to the main branch yet.
The problem ...
-1
votes
2
answers
908
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 ...
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__)...
0
votes
0
answers
102
views
Git - nest an optional repository inside a repository
I have an existing repository (which is organised using the standard Golang project layout)
cmd/
bigproject/
main.go
internal/
...
pkg/
...
vendor/
...
What I would like to do ...
3
votes
4
answers
386
views
Releasing untested features using git flow
not quite sure how to put that into the title, because the issue is a bit specific.
Basically, we're using gitflow (slight variation of it) in our application. So, this means we have the following ...
0
votes
3
answers
606
views
Is there a design reason why Git commits only store pointers to their parents, not children?
Git commits contain pointers to their parent commit(s). Is there a reason why they don't also contain pointers to their child commits?
I get that there's a problem of data duplication, in that you'd ...
17
votes
7
answers
5k
views
When should I create another branch in git and when should I use the main branch?
I am working on a project on my own and I am using git just to keep track and to get used to a team environment. When should I commit on the main branch (if I should at all), do I need to create a ...
2
votes
2
answers
384
views
Shared Branch while working on User Story
Two developers (front-end and back-end) are working on one User Story, while the front-end is dependent on the work of the back-end. What is the best way to handle this dependency regarding the ...
-1
votes
1
answer
589
views
Best practice for git repo locations
I started my first job as a dev about 3 months ago, at a very small company where I'm (currently) the only developer, and I've been setting them up with git. Their codebase is a bit all over the place,...
0
votes
2
answers
3k
views
Git-flow: How to create a hotfix release when there are future releases?
This question is related to Vincent Driessen's Git Flow branching model.
To better describe my problem I would like to use one of Mr. Diressen's great pictures in a slightly modified way:
The ...
3
votes
2
answers
558
views
Git flow for multiservice monorepo
My project is a monorepo where the top level directory contains build infrastructure and a set of project directories for different services. Each service has its own branch of development. The ...
0
votes
1
answer
214
views
Branch management when you cannot merge due to holidays
I’m working on a small project with two other developers. Our work is on Gitlab. Our general workflow is that we create feature branches by branching off development which get merged back into ...
0
votes
2
answers
74
views
Rapid rate of merging new code with minimal testing [closed]
In some companies, code is merged at a rapid rate by multiple teams with minimal testing and somehow the number of bugs is kept to a minimum.
In other companies, this leads to chaos and terrible ...
-1
votes
4
answers
337
views
Best practice for knowing the link between binaries (*.exe and *.dll) and their source code?
I'm working in a company, where we work with a kind of plug-and-play system:
An executable is put inside a central directory, and there is a Modules directory, where DLL files can be inserted, which ...
2
votes
3
answers
248
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 ...
-4
votes
2
answers
164
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 ...
1
vote
1
answer
76
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
248
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 ...
-3
votes
1
answer
126
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
2
answers
104
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 ...
0
votes
0
answers
48
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
193
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 ...
0
votes
1
answer
340
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 ...
3
votes
2
answers
621
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
108
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, ...
3
votes
2
answers
315
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 ...