Questions tagged [git]

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

Filter by
Sorted by
Tagged with
1 vote
1 answer
7 views

Trunk Based Development: static types and dependencies

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 ...
user avatar
-4 votes
1 answer
45 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 ...
user avatar
-3 votes
0 answers
76 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 ...
user avatar
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 ...
user avatar
3 votes
1 answer
156 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 ...
user avatar
  • 53
-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 ...
user avatar
  • 1,643
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 ...
user avatar
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, ...
user avatar
-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 ...
user avatar
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 ...
user avatar
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 ...
user avatar
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, ...
user avatar
  • 117
3 votes
2 answers
235 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 ...
user avatar
  • 181
2 votes
0 answers
170 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 & ...
user avatar
  • 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 ...
user avatar
1 vote
2 answers
153 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 ...
user avatar
  • 2,511
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 (...
user avatar
0 votes
2 answers
121 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 ...
user avatar
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 ...
user avatar
  • 109
1 vote
2 answers
129 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 ...
user avatar
3 votes
4 answers
293 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:...
user avatar
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 ...
user avatar
  • 163
1 vote
5 answers
825 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 ...
user avatar
  • 269
-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. ...
user avatar
2 votes
4 answers
459 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 ...
user avatar
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 ...
user avatar
  • 329
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 ...
user avatar
  • 127
2 votes
2 answers
266 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 ...
user avatar
  • 131
1 vote
3 answers
370 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 ...
user avatar
0 votes
1 answer
96 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 ...
user avatar
  • 131
4 votes
2 answers
600 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 ...
user avatar
-1 votes
1 answer
31 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 ...
user avatar
  • 155
2 votes
3 answers
179 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 ...
user avatar
0 votes
2 answers
169 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, ...
user avatar
  • 139
3 votes
1 answer
159 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 ...
user avatar
  • 1,021
1 vote
1 answer
233 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 ...
user avatar
0 votes
1 answer
105 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 ...
user avatar
14 votes
3 answers
4k 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 ...
user avatar
3 votes
3 answers
176 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 ...
user avatar
1 vote
2 answers
93 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 ...
user avatar
1 vote
1 answer
513 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 ...
user avatar
  • 119
4 votes
2 answers
342 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 ...
user avatar
0 votes
1 answer
269 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 ...
user avatar
  • 172
1 vote
1 answer
186 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, ...
user avatar
  • 172
0 votes
1 answer
249 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 ...
user avatar
  • 172
4 votes
9 answers
567 views

Should I be enforcing lint rules on feature branches?

I am working on a project and I typically setup precompile git hooks for things like linting and testing. I recently had some consultants we use complain about requiring lint on every commit. Their ...
user avatar
0 votes
1 answer
587 views

Trunk Based Development and Long Lived Release Branches

My very large team is following trunk based development with many short lived features branches, trunk, and a release branch for when we create release artifacts. This is a team that keeps the release ...
user avatar
  • 3,248
7 votes
1 answer
279 views

How do you use version control systems while you are in a long design spike phase?

In some recent projects, I found myself having some longer spike phases in which I build many cheap prototypes and explore different design decisions, long before I would consider my code of ...
user avatar
-2 votes
1 answer
295 views

Git semantic commit versioning for file deletions

What commit type should I use when I'm deleting files from a repo? I have seen several types over the internet, but none talk about file deletions. Possibly the closest options that come to mind are ...
user avatar
0 votes
1 answer
282 views

Git structure for Azure Function Apps that accounts for shuffling functions

I have a suite of python Azure Function Apps that all together make up an integration, each containing multiple functions: FunApp1 func1 func2 SharedCode FunApp2 func3 func4 SharedCode FunApp3 ...
user avatar

1
2 3 4 5
23