Questions tagged [git]

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

Filter by
Sorted by
Tagged with
0 votes
2 answers
62 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
147 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
133 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 ...
  • 139
2 votes
2 answers
115 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
177 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 ...
-1 votes
2 answers
69 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 ...
  • 7
-1 votes
4 answers
199 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 ...
  • 1,683
2 votes
3 answers
175 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
51 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 ...
0 votes
1 answer
32 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
168 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 ...
  • 53
-3 votes
1 answer
90 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 ...
  • 1,683
0 votes
2 answers
79 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
40 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
109 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
118 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
160 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
99 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, ...
  • 117
3 votes
2 answers
244 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 ...
  • 181
2 votes
0 answers
238 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 & ...
  • 29
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 ...
1 vote
2 answers
267 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 ...
  • 2,521
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 (...
0 votes
2 answers
149 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
0 answers
82 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 ...
  • 109
1 vote
2 answers
131 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 ...
3 votes
4 answers
328 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:...
3 votes
2 answers
139 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 ...
  • 163
2 votes
5 answers
1k 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 ...
  • 279
-2 votes
4 answers
299 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. ...
2 votes
4 answers
485 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 ...
8 votes
3 answers
2k 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 ...
  • 329
1 vote
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 ...
  • 137
2 votes
2 answers
315 views

How to handle code reviews on a collaborative feature branch

We are using GitHub as our source code repository along with Visual Studio. We are going to start to use the GitFlow branching model, so a new feature request will be branched off and worked on in ...
  • 131
1 vote
3 answers
525 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 ...
0 votes
1 answer
117 views

How should I handle production rollbacks and eventual hotfix using gitflow?

I want to implement gitflow but I have a question. Let's imagine I have release version 1.0.0, it works nicely so I merge it into master. We deploy and it goes to prod. Sadly we didn't notice ...
  • 141
4 votes
2 answers
686 views

When creating a fix, how does branching off the release candidate branch compare with cherry-picking from master?

When we have bug/hotfix for the release candidate, we branch off of the RC branch and merge that fix back into the RC branch. We also merge (git merge, not cherry-pick) that fix into the master branch ...
-1 votes
1 answer
34 views

CRDTs and merge conflicts in DB design

I face this problem with software development quite often, but I don't really know the name of this issue. It sounds quite common, though. Two nodes (a computer and a mobile phone, for example) share ...
  • 155
2 votes
3 answers
193 views

Git tags as an alternative to --no-ff in gitflow

In https://nvie.com/posts/a-successful-git-branching-model/, Driessen suggests using the --no-ff flag to make the history of commits for the dev branch clear. This is an easy flag for individuals on ...
0 votes
2 answers
194 views

Git branching model that support small changes and downstream dependencies

Challenge: I am implementing a microservice/app/applet. Several features will be delivered As things develop later features rely/depend on earlier Pull-Requests (PR) Developer resoruces are finite, ...
  • 139
3 votes
1 answer
195 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 ...
  • 1,041
1 vote
1 answer
267 views

Git workflow - when exactly do you need dedicated branch for release

I have worked with Git workflows where we release from dedicated branch specifically used for release (e.g. Gitflow's master/main branch). In such workflows, there will be multiple (at least 2) long ...
0 votes
1 answer
106 views

Best GIT approach to educational project

I am working on a course design and I'm preparing the project that the students will have to work on all along the course. Each student will create a GIT repository a the beginning of the course and ...
16 votes
3 answers
5k views

What is a non-merge commit?

In the announcement of Linux 5.15-rc1 Linus said: At only just over 10k non-merge commits, this is in fact the smallest rc1 we have had in the 5.x series. What is a non-merge commit? What's the ...
3 votes
3 answers
180 views

Etiquette / Leadership / Sharing Best Practices - How much should I try to influence?

I recently joined another team part time where I kinda know several of the people, and they know me for my design work mostly, but I'll be doing design and some development with them. There's a lot of ...
1 vote
2 answers
105 views

Git dynamic merge branch

I'm currently using git to manage a "modpack" for a game, the modpack is made of several smaller mods, each of which is a branch. Some mods may also depend on, potentially multiple, other ...
1 vote
1 answer
582 views

How can I write good Conventional Commit-style commit messages for one feature over multiple commits?

If I am working on a single feature, I would usually commit multiple commits. Should every commit start with feat? Or should only 1 commit have the type of feat and use a different type for the other ...
  • 119
4 votes
2 answers
363 views

Introducing a code formatter to an existing code base with running branches

We have an existing code base in Python which doesn't yet use any code formatting tool. Now we have settled on YAPF as a tool and also created its configuration file. To me it is not clear how to ...
0 votes
1 answer
275 views

Why are several versions in production a key to choose GitFlow over GitHub flow?

I've seen in many places, one of them here (and also in the guiding questions of GitVersion) that, when coming to determine whether or not to use GitFlow, one key consideration is whether or not I ...
  • 172
1 vote
1 answer
218 views

GitFlow question about develop and hotfix branches

I've read the canonical article about GitFlow by Vincent Driessen, and there are 2 things I'm not sure about: In the big diagram in the beginning of the article: In the line of the develop branch, ...
  • 172

1
2 3 4 5
23