Questions tagged [git]
Git is an open-source DVCS (Distributed Version Control System)
1,119
questions
50
votes
11
answers
9k
views
How can a developer overcome their fear of merge conflicts? [closed]
I'm a beginner at collaborative development, I started learning about merge conflicts.
And I have this question.
Is it possible for a developer to deliberately postpone merging because he doesn't want ...
2
votes
1
answer
428
views
How do pull requests fit into a development process?
In my software engineering career I have never worked with pull requests. Probably because I only ever worked in relatively small teams (5-16 people) and only on projects that were structured well ...
-3
votes
1
answer
96
views
Reverting commits after merge
I am working on dev branch and I merged dev into master so all the commits not appear on master but I am not very confident about some thing. Should I do pull request and then merge or this way is ...
-1
votes
2
answers
92
views
Working on a two branches, that are not dependent by business meaning, but dependent by implementation
I have a class Foo with lots of fields and have two tickets to refactor that class.
the first ticket is to rename it to Boo and two move it to another package.
the second one is to rename some fields ...
-1
votes
1
answer
475
views
Is there a way to use git with multiple users on a shared computer?
I'm currently a user of a large research compute cluster which has many other users. We all have access to a shared program that is being actively developed and used. Since we are all effectively ...
2
votes
2
answers
389
views
Who is the potential audience of a commit message?
I've been taking a course on plain language writing, in order to make my commit messages more readable and understandable.
One of the main ideas in plain language writing is that your first identify ...
68
votes
8
answers
14k
views
In code review, should I ask to do a refactor outside of the scope in a pull request?
I have been studying the best practices for a code review, and I was wondering what to do in the following scenario:
During a code review, I see potential improvements, but decide that they are ...
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
880
views
What is the relationship between continuous integration and git hooks?
I'm trying to get into the habit of making sure that each master commit to a repository I work on does not break any existent tests. In my current flawed workflow, there are some intermediate commits ...
0
votes
3
answers
483
views
Is it reliable to compress database backups with git?
I'm working as an intern at a fund. I spent the last month building a website for internal use, and now I think it's a good time to set up a backup scheme for the MySQL database at its backend. Funny ...
4
votes
2
answers
259
views
Proactive git branch conflict detection?
I'm considering creating a new tool, but I wanted to find out if something like it already exists.
tl;dr: Looking to make or employ a service which scans a SCM repository with the explicit goal of ...
-3
votes
2
answers
231
views
Gitflow, use code from another feature branch in feature branch
me and a friend are working on a project, and we are both doing seperate things (he does UI, I do some data structure), and his code relies on my code. Right now we have a master, a develop and 2 ...
2
votes
1
answer
182
views
Is there a convenient way to include only a particular snapshot of a git repository inside another project?
Update:
I think I may have found one possible solution for this question: git worktree. I'll have to investigate its exact workings a bit more, because I'm not entirely sure yet if it can do what I ...
1
vote
2
answers
129
views
Releasing from feature branches
My app is being deployed on various platforms, among which GNU/Linux, iOS and Android. I am contemplating the branching model of the central C++ code git repo, upon which all platform-dependent code ...
0
votes
5
answers
566
views
How to reduce the merge-redundancy due to testing in our Git workflow?
We have are a small team of 6 people working with Scrum and Git.
We are developing a quite complex webapplication with the ZK Framework. It uses Java and a MySQL database.
We have adapted the "Git ...
-3
votes
1
answer
168
views
how to manage build and deployments from Multi repos using versions
Consider you have two repos A, B.
Let say repo A has some infrastructure code - not needed to be updated always-
but it has the code for the service we want to deploy as infra.
On the other hand, ...
0
votes
2
answers
531
views
What's the correct Git flow to develop on two independent features + one feature that relies on both?
I'm trying to find the correct flow to manage this kind of development, where A and B are two independent features, and C is a third feature that relies on A and B.
An obvious approach would be to ...
0
votes
2
answers
286
views
Could git be implemented in SAP ERP instead of the transport system?
In SAP ERP (probably in other SAP systems as well), you have transport orders which you could see as "commits" i guess in git. These transports are send from development to test or production system ...
7
votes
2
answers
711
views
Versioning in parallel features development
I have a library (npm package, LIB) which is used by the application code (APP). In a release of APP, multiple features are worked on parallely. Sometimes these features need support from LIB, so the ...
1
vote
0
answers
142
views
Gradle + Git - enforcing a version change upon merge to master
I am leading a team of developers creating a Java library. We are following the standard Semantic Versioning model. The code is versioned with Git. Artifacts are built and pushed to an artifact ...
26
votes
6
answers
6k
views
How to structure commits when unit test requires refactoring
I'm trying to get a review for my lists of pros/cons about how to structure commits that came out of a discussion at my work.
Here's the scenario:
I have to add feature X to a legacy code base
The ...
3
votes
3
answers
462
views
TDD and GIT workflow. How big should branches be?
Let's say we are using TDD while developing some Calculator class (the simplest case - it should provide add, sub, mul and div public methods). We initially start with develop branch. The following ...
2
votes
2
answers
201
views
Git work flow with pull requests
I have come across a small issue with the git work flow in the team.
When starting to work on a user story, we create a feature branch from the develop branch. Once the user story is finished, a ...
-1
votes
1
answer
357
views
Good / Bad idea to start a pull request in the beginning of a project
The current workflow we have in place at my company with regards to git is:
Develop on a branch
Push every so often
When done developing, open a pull request in Github
We have a reviewers on that ...
0
votes
2
answers
123
views
How to Maintain Rarely Used Scripts
I come across the need to do a lot of one time scripts (related to API evaluations, data extraction, experiments etc.) that have the potential only to be used very rarely in the future. These could be ...
0
votes
4
answers
415
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 ...
4
votes
2
answers
1k
views
Git commit hashes and Git merging between branches
We have a scenario where we'd like to use two branches in our git workflow, otherwise known as develop and master.
The current flow is as follows:
Create feat-branch - this branch will be based off ...
-2
votes
2
answers
2k
views
Using Github Branches to maintain two versions of a project?
I have a Github project for a Django web-app that one team uses. Other teams are interested in also using it and they'll need separate instances of it (it's a stock tracking database so they need to ...
2
votes
1
answer
437
views
In what file do I put the installation steps in my git repository?
I have a git repository and I would like to add the installation steps required to make the project work locally. The project is a company and private project and users will also be contributors. I'm ...
0
votes
3
answers
1k
views
Does it actually matter from which branch you create a new branch in git?
Well as per title, does it matter in any way functionally (say when rewriting history or something), from which branch one derives a new branch?
If at the point of time when creating the new branch ...
38
votes
6
answers
10k
views
Whose responsibility is it to fix merge conflicts?
Say that A is working on a branch based off master and B merges changes into the master branch, which introduces merge conflicts between A's branch and master.
Whose responsibility is it to fix merge ...
2
votes
1
answer
514
views
Are symbolic links a good way to 'import' a project into another?
I've been thinking on how to import a project B into a project A, which both are GitHub repositories.
Project B is a library I reuse over many projects, I do add stuff in it, directly from project X, ...
2
votes
1
answer
1k
views
How to cope with production rollbacks when using gitflow
We're reviewing the popular Gitflow as our git branching model and I've liked it so far. One case I'm not sure about is the production rollback. Say we've there's a new feature that we're planning to ...
3
votes
4
answers
366
views
How to ensure that developers see only the project modules they are working on?
This is my first time PM experience. I have created a developer team and we want to work on an Angular-NodeJS project.
I have defined some tasks and divided the project into the different modules/...
1
vote
1
answer
75
views
Should we keep very similar files with slight feature differences under different names?
In my team, we use git branching to keep different features separate (of course). However, one co-worker insists on keeping these features in different files as well to avoid merge conflicts. For ...
4
votes
3
answers
1k
views
Git workflow for somewhat large team
The team I am on is using the git implementation in Azure DevOps. We have been using almost the GitFlow model. We are using story branches instead of feature branches, and the long-lived develop and ...
10
votes
1
answer
995
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 ...
1
vote
0
answers
61
views
External standalone cpp code in my project
I've inherited a project that has a codebase in src/, but it also has precompiled binaries of dependency software in bin/. I would like to move away from having precompiled software as part of our ...
4
votes
1
answer
137
views
Git replace file merging (or preserving) history
A long time ago - and long before I joined the project - my project was migrated from clearcase to git. This migration led to the following file layout:
.
├── bar
│ ├── bar.c
│ └── bar.h
├── foo
│...
-1
votes
1
answer
412
views
Is rebase -i better then revert?
Say a branch is created with many merges/commits, then you figure out 1 merge was bad. Would it be better to undo it with rebase -i or with git revert or by manually undoing some changes and adding ...
5
votes
2
answers
428
views
Where can I put project dependencies
I've just finished my studies in Computer Science and now I'm working.
The problem is I'm the only computer scientist in my company and I'm probably taking a lot of bad habits. I would like to correct ...
3
votes
1
answer
2k
views
With the "git flow" approach, why are release branches merged into develop?
In the git flow workflow, it is recommended to create branches for releases, and when the release-specific work is done, merge the result into the master and development branch.
I understand why we ...
-1
votes
2
answers
434
views
Git Tagging for SaaS application with CD and SemVer
I'm developing a SaaS application where I'm required to keep track and publish every change in a changelog. I've started to follow a Semantic Versioning approach and also using Continuous Delivery.
...
0
votes
1
answer
374
views
Why is Git LFS not the solution to the problem? [closed]
I am working with Perforce for 10 years. Our repository has around 500.000 submits and our submits are either C/C++ source code or (binary) dependencies.
The lack of editor support for Perforce was ...
-1
votes
3
answers
968
views
What is the best GIT workflow with CI/CD with submodules in a master to a test environment and a stable branch to a production environment?
We have a several GIT repos in Azure DevOps with .NET Core web applications that are related to each other with the use of submodule (we used autocreation of NuGet Packages in a private NuGet store, ...
1
vote
2
answers
85
views
How do I maintain configuration in the case of multiple test environments and application instances
What's the best practice for maintaining app configuration for multiple test environments, (and production)?
At the moment I am keeping all the config in the code repo (a bitbucket server). Configs ...
58
votes
8
answers
10k
views
Do seasoned developers still have to deal with merge conflicts?
I am still a software engineer in training, but I have heard the following adage multiple times:
Good coders don't have to deal with merge conflicts.
Whenever I work on a project with others, I'm ...
-5
votes
2
answers
128
views
How to make my team of developers follow our Git workflow [closed]
We have a team of 6 developers working in multiple technology stack. Most of these developers have little experience 1 - 2 years to be precise.
We are very successful on enforcing coding standards ...
3
votes
1
answer
240
views
How to leave debugging information in code before it hits production or even after?
Usually, I open a git branch to work on some task. When I finish the task I send it to be reviewed. Then it's sent to central staging git branch which contains all tasks that have passed review. Our ...
1
vote
2
answers
1k
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) ...