Questions tagged [git]

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

Filter by
Sorted by
Tagged with
3 votes
2 answers
186 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
3 votes
5 answers
3k 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 ...
  • 316
-2 votes
4 answers
304 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
680 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
3k 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
2k 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
467 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
982 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
181 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
922 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
45 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 ...
  • 157
2 votes
3 answers
251 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 ...
1 vote
2 answers
287 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, ...
  • 149
3 votes
1 answer
410 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,061
1 vote
1 answer
365 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
112 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 ...
17 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
193 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
135 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
757 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
466 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
320 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
307 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
0 votes
1 answer
452 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 ...
  • 172
4 votes
9 answers
695 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 ...
0 votes
1 answer
1k 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 ...
  • 3,238
7 votes
1 answer
301 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 ...
-2 votes
1 answer
670 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 ...
0 votes
1 answer
409 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 ...
1 vote
1 answer
112 views

legacy refactor and churn

I am trying to work on finding the following metrics New Work - totally new code which does not replace other code. Churn - code that is rewritten or deleted after being written Help Others - where ...
  • 141
2 votes
2 answers
135 views

How can avoid I merge conflicts on an interactive coding tutorial for beginners?

I am working on a JavaScript tutorial series for someone who has no experience coding. The format of the series is that it is a public Github repo. Each lesson is a README.md markdown document, and ...
  • 2,513
0 votes
1 answer
73 views

Modernizing a legacy source control / deployment infrastructure

I've got a large, old application with a clunky, extremely manual deployment process (essentially, tribal knowledge combined with random scripts / build jobs scattered across servers). The application ...
0 votes
0 answers
122 views

Sole software engineer for a small company. How to handle deployment?

I'm the only software engineer for a small company and I want to make my deployment process more robust because I can't work away from my dedicated workstation with my current process. I only make ...
  • 35
0 votes
1 answer
3k views

How to structure Python modules so they are accesible from different submodules

This is somewhat similar to this question but I could not find a solution there. I have a project that I've worked on over the past 4 years. I started without any Python knowledge and learned as I ...
-2 votes
1 answer
88 views

What is the "workflow," like when managing a custom GIT fork?

I'm thinking of creating a custom fork of a program to customize and fit my day-to-day uses a bit more, and was wondering how I would manage the fork to keep up to date with bug fixes and stuff in the ...
4 votes
1 answer
380 views

Alternative for C# Library distribution within an Organisation

I am looking for advice on how to manage shared code between several projects more effectively. Currently, we have several applications that use the same common backbone of infrastructure code, from ...
1 vote
0 answers
315 views

Which commits should I use when calculating DORA "Lead time" metric?

As per the "Accelerate State of DevOps 2019" (you can download it here) they define lead time for changes as: how long does it take to go from code committed to code successfully running in ...
0 votes
1 answer
366 views

What to do with a big pull request for just one feature?

We are using git flow as a branching model, and we have a feature ticket that conceptually is a pretty small feature in the software management tool, in this case Jira. The thing is that the code on ...
0 votes
1 answer
203 views

AWS CodeCommit - duplicate test and production repos

I am using AWS CodeCommit with CodePipeline. I have two totally separate AWS accounts, one for test and one for production, identical Code Pipelines setup in each account, each with a corresponding ...
0 votes
1 answer
2k views

How to organize multiple microservices in a GitHub repository?

I am setting up a Github repository for a project that will have multiple Microservices. I have created a sub-directory for each microservice under One Repository. ProjectRepository \Services ...
3 votes
5 answers
389 views

Can we use Git as an additional tool to better estimate maintenance effort?

I'm working with a codebase that is almost 4y old, just a little under 2000 source files and roughly 100 developers have committed to it. One of our third-party dependencies is not actively maintained ...
0 votes
3 answers
96 views

How do I create a second App in git where only a few files throughout the Tree are different from the first app

I will have to create a second app based on the first app. The second app shares 98% of the code (Some of the UI is different). I am wondering how to set up the second app without creating a merging ...
  • 117
1 vote
1 answer
227 views

How to maintain well structured code and latency optimized code together?

I'm working on a c++ data analysis project. My workflow goes like this Analyze the data and build models Optimize the code for latency, to deploy for production goto 1 Step 1 has lots of machine ...
-3 votes
2 answers
612 views

Correct standard to do a pull request when the local branch is outdated against the remote repository

The scenario is the following: For a project, such as Spring Security available on github, the following is accomplished: forked and cloned git remote add upstream URL-Remote-Repository git fetch ...
-1 votes
2 answers
473 views

How to proper deal with fixed bugs in feature branches

It could sound trivial, maybe it is. I have a new feature branch (say newfeaturebranch, branched from develop), but during the development a new bug is found and fixed in develop. The bug is found to ...
0 votes
1 answer
1k views

Git repository with multiple projects that share code

I have some projects that share code. This is my folder structure: Workspace +-- Libs +-- Project_A +-- Project_B +-- Project_C Project_A, Project_B and Project_C use code from directory Libs. I'm ...
  • 203
0 votes
2 answers
140 views

first basic git setup: solo dev, shared hosting, side project websites - how many repos, and which is main?

tl;dr: correct way to add git to existing website project with dev subdomain on same shared hosting server? I have some side project websites. They're all on shared hosting. I've never used version ...
2 votes
1 answer
484 views

Which git workflow for micro-services and testing

I would like to know what best practices exists out there with regard to micro services, CI/CD, testing and Git workflow, especially the way of working given the constraints that a) nothing should ...
  • 137
2 votes
4 answers
340 views

How can I keep track of which existing lines of code/text have passed some new review?

Firstly, this is a really tough topic to do searches for because you get a wealth of information on “code review”, which is different from what I’m referring to here. That normally refers to ...
  • 241
0 votes
0 answers
220 views

How to maintain and deploy a poc (Proof Of Concept) version of an app?

In our organization we sometimes have to create a poc (proof of concept) to either validate or invalidate the way to go. Currently we're having a discussion around how to embed this within our ...
  • 109

1
2
3 4 5
23