Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [git]

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

-3
votes
0answers
21 views

Get latest tag from specific branches

I am trying to figure out a way to get the latest tag between two branches. Let's say I have the following structure: o - master tag=v1.1.3 | |o - v1.1 tag=v1.1.2 || |/ o - tag=v1.0.2 | |o - v1.0 ...
0
votes
1answer
38 views

How to have SQL Server with Git, TeamCity and Octopus auto-deployment work with schema-level restrictions?

We are starting to integrate our SQL Server workflow with Git, by which I mean generating scripts for all objects and storing them in a Git repository so you can pull, edit, commit, push and apply, ...
0
votes
1answer
77 views

Git Flow, pull requests, multi-destination branches and conflicts: how is it supposed to work?

I get it for feature branches: A feature branch is created from develop. One single PR is then created, going to develop. If there are conflicts, fix them in the feature branch. Quite ...
-2
votes
1answer
60 views

Managing release branches in Git

When learning Git for the first time, I posted Git branching and tagging best practices. I learned a lot from this and have adapted git flow patterns to my personal projects since then. I am now in ...
2
votes
3answers
255 views

How to manage a global source code style change?

We have a large Git repo. The files are a mix of styles: tabs vs spaces, unix vs windows line ending, JSON formatting styles, etc. We'd like to change every file to be consistent. However, if I ...
2
votes
0answers
67 views

Handling multiple pull requests from a branch

Our current workflow is that we create a Sprint branch and then developers create Feature branches having the user story number. Once the story is complete this Feature branch is merged to Sprint ...
1
vote
0answers
36 views

Wordpress and git, (using WPE), how do you incorporate database changes into the workflow?

We use WordPressEngine and want to have multiple developers and multiple branches using git. One challenge is how do we incorporate the database into the workflow? Should we take a sql dump and ...
2
votes
4answers
165 views

Managing QA testing when there's pressure to merge things at the earliest possible

I'm working in a team of 12 where we have around 8 developers and a QA. We do not follow a git flow model but we do have feature branches where individual feature developments take place and then ...
1
vote
1answer
100 views

How do you manage development-only files in your source control? [duplicate]

When merging development code into the production code, what is the preferred method for handling items that should not be in the production code branch? For example, I have configuration scripts that ...
1
vote
3answers
154 views

Git project organization

My company currently has SVN as main version control and we are in process of migrating to Git. Doing that is a perfect chance to do a structure reorganization. Before I get to that let me describe ...
40
votes
6answers
6k views

What's the best way to handle refactoring a big file?

I'm currently working on a bigger project which unfortunately has some files where software quality guidelines where not always followed. This includes big files (read 2000-4000 lines) which clearly ...
0
votes
0answers
70 views

Git feature branch workflow for multiple branched features

I wanted to summarize a quick discussion we had in my stand-up today. We have a big feature branch merge coming up in our system. We are replacing the old live, system (branch master) with a redesign (...
4
votes
5answers
180 views

Git branches: Merging issues while having multiple release branches

We have to support multiple releases, so we are following git branching model similar to the above diagram. Now the problem is that we have to do lots of merging here example for fix/011, we are ...
3
votes
5answers
333 views

Versioning: Where exactly in the code or repository should I write the version number?

Right now I'm doing this: Update the readme to include the new version number and what it does. Commit the version number in git commit message (i.e git commit -m "1.2.1: this does that"). Push the ...
1
vote
4answers
158 views

Git Flow: should develop branch be unit tested in CI?

We have a Git Flow type workflow (in rails) where our 'testing' (aka develop) branch has feature branches merged into it for UAT. So: master has the current running production system. feature ...
-1
votes
1answer
33 views

Branching strategy when utilizing open source application

I'm looking for advice on what a good branching strategy looks like when using mostly open source code. Most of my dev experience is with writing and working with custom made code and only using open ...
30
votes
4answers
4k views

When should a commit not be version tagged?

Context: I recently found out about Semantic Versioning, and am trying to determine how to best use it practically for my own projects. Given that semver takes major changes, minor changes, and ...
1
vote
2answers
80 views

Refactoring large comment blocks

I am working in a fairly old code base. In the code base they have the classic source control, gigantic code blocks at the top of the files and above the function definitions that have something like ...
1
vote
0answers
33 views

What impact does the ancestor file have with git merge-file?

Consider this example command line session... $ git --version git version 2.19.0.windows.1 $ echo "header" > ancestor.txt $ cp ancestor.txt left.txt $ cp ancestor.txt right.txt At this point, ...
1
vote
2answers
138 views

Applying hotfix to intermediate commit on master

Below is the Gitflow workflow followed, where master branch has the commit history(git tag) of different releases. From release mgmt aspect, we are deleting the release branch after merging with ...
-2
votes
1answer
82 views

Release pipeline - Which artifact goes in production?

Below is the GitFlow workflow, we are using for a project. So, in our project master branch currently has only one git commit with just a Readme file. develop branch is forked from that commit. As of ...
1
vote
1answer
108 views

Reducing dependencies between stories & which branch (GIT) should QA's test on?

Background We have a team of 8 devs and 1 QA (tester) and we're struggling with dependencies between tickets and causing a lot of merge headaches and/or people waiting around for the next bit of work ...
0
votes
0answers
25 views

Code base architecture for one app that has multiple versions with small changes [duplicate]

I'm building a hybrid mobile app that has slightly different versions but share 99.9% of the code. There is a paid and free version, which differ in one function only. Also there is a slight ...
2
votes
0answers
56 views

Can/Should I make an automatic installation of new python libraries after a git pull?

Imagine the following situation: I'm working on a python project, and I install the library antigravity with pip. I add the function fly() which uses the library, and I commit and push the changes. ...
4
votes
2answers
186 views

How do I merge branches between Develop - Test and Production without moving across 'test' specific code?

I have a web application that has some specific differences between production and test environments. I.e. test email config, test payment config, the word Test written on the home page (useful to be ...
1
vote
3answers
80 views

Do I need to 'deploy' my web project when I can just keep a recent clone of the Master-branch in public_html?

We have git installed on our webserver (via cpanel), but unfortunately no CI- / Deployment-Tools. Would it be good practice just initialise our repository in /public_html/ and push our local Dev-...
1
vote
1answer
104 views

Storing test results in a Git repo?

At my company, we use a distributed pool of virtual machines to run our UI and API tests. These machines are all connected to an onsite server which the pool uses for publishing the test results and ...
1
vote
2answers
90 views

How to deal with multiple features in a single git repository in QA

So I'm running into an issue with us trying to test multiple features in our QA environment at the same time. Essentially, changes are taking too long to get promoted in our CI/CD pipeline. The way ...
1
vote
0answers
80 views

Multi module Maven project or separate repositories?

Consider the following architecture: Application A Application B Commons-Util A and B share a lot of functionality. That's why we plan to extract the shared code into a commons library. I am aware ...
2
votes
1answer
105 views

Sharing a sub-project and some users are git beginners?

We have two teams, each using git, and would like to share a small project between them. Git submodules sounded like an obvious answer until I started searching and found lots of "submodules will ...
0
votes
1answer
66 views

Effective GIT Branching Strategy

I am trying to figure out the optimal branching strategy for my organization. And I have few doubts. We have 3 main environments, Live(Production), UAT (pre-release) and Staging. Similary in GIT we ...
-2
votes
1answer
45 views

Fork 3 repo's into 1 main one

I have a specific problem in git which I havent found an answer to yet. In gitlab I have 3 seperate repos. For my school project the teacher wants me to copy everything into a repo of his and wants to ...
5
votes
5answers
456 views

How do I keep two git projects in sync with each other?

I'm developing a Python library, and I'm also developing some code that uses it. Currently they are in the same git repository, but I want to separate out the library part into a separate repo, in ...
-5
votes
2answers
61 views

Authenticate Git Pulls on a Compromised Machine [closed]

I may have a tough one for you. I have a machine in the wild that is and will probably continue to be compromised. The machine is owned by a user who will be unable to keep it secure. I must have ...
0
votes
1answer
45 views

how to build a stable API product and allow specification per project? [closed]

I am in search of information on how I to manage code in git flow and methodology to test and work with it : I have an API in place to build and manage a product catalog and it was designed around ...
2
votes
1answer
73 views

Git branch management vs deployable environments

I am looking for a git branch management model that would be used easily and would allow for Continuous Integration/Delivery. Imagine I have 3 environments: prod, uat and dev. The code repository ...
-1
votes
1answer
117 views

Implement Branching strategy in DevOps for Multi-Tenant application

I have asked this question on Stack Overflow and I got a suggestion of posting it here for better suitability. So here is my question : I am new to DevOps, and i have a solution with Umbraco as CMS, ...
1
vote
1answer
59 views

Publish a single ASP.NET Web application on multiple domains with Git support

I have a developer who is developing an ASP.NET Web application for me and I've been publishing it so far on my server, example1.com, so far without any problems. It is managed with a single Git ...
2
votes
2answers
175 views

How to avoid code duplication in two similar projects?

We have a website with a lot of functionality, and we now start another one, which should have a lot of common code with the first one. What would be the best approach to avoid code duplication? ...
2
votes
1answer
118 views

Bringing a large, complex legacy project under git control

I'm a newbie with respect to git, but not to version control in general — I've been using CVS and Subversion for years. I've read both the Progit and O'Reilly (Version Control with Git) books, ...
-1
votes
1answer
25 views

How to use pull requests for code reviews with a shared remote repository?

I'm looking to improve the processes in our team. We currently are pretty informal: "I've finished feature X. Can you review my code?". This is not scaling up well now that we're busier - it's hard ...
0
votes
2answers
77 views

SVN / Git How to administer branches

I'm the technical lead for a small company (6 developers). We currently use SVN and we're slowly porting over to Git, after everyone gets their training. Currently our clients are the ones who "pull ...
2
votes
1answer
94 views

Do we have distinct type of branches?

There is what we call feature branch in git. Imagine for example I am making a game and I need to add a Power-up feature. How I see my commits names with feature branches: Branch name: Adding Power-...
3
votes
3answers
147 views

Git workflow regarding remote feature branches

I've been using git for a while, but still do not understand how to deal with feature branches. When you develop in a feature branch in a strictly local manner everything makes sense. You commit, ...
2
votes
1answer
51 views

managing multiple git repo that are similar [closed]

We are creating several websites, the main content will be the same across each of them but there will be some differences (e.g. extra button, extra texts, different styling) what is the best way to ...
-4
votes
1answer
67 views

GIT - how to confirm repository ownership

I am starting a new service that would be an abstraction on top of git repositories. Basically, a user would sign up and Add Project (GitHub/GitLab/BitBucket repository). The tricky part for me is ...
-1
votes
1answer
57 views

Should I further branch off of a new branch or continue developing an additional feature in the same branch?

I have a branch (dashboard) which I am developing a new feature on. To make the example easy to follow, I am developing two separate functions (function1() and function2()). They work how I want ...
3
votes
1answer
351 views

Does it matter which branch I push to?

My question is around how branch pushes work exactly; I have come across something that doesn't make logical sense to me and as such would like an explanation as to why I am experiencing this ...
0
votes
1answer
78 views

Git branching model for teams with develop, test and deploy phases

A developed piece of code goes these phases in our team: Developers write the code Then they send it to testers If tests pass, then testers send the change/new feature/bugfix to operations team for ...
-1
votes
1answer
58 views

Knowing what will get released in gitflow

We are a web SaaS company using gitflow and JIRA. As we are 'done' (QA approved) with a feature, we move the story/ticket forward in Jira to a 'done' status. At that point we wait until it gets ...