Questions tagged [version-control]

A programming discipline for tracking, storing and retrieving revisions of source code.

Filter by
Sorted by
Tagged with
-2
votes
3answers
97 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, ...
57
votes
8answers
9k 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 ...
0
votes
1answer
23 views

API Request/Response Model for showing differences in JSON objects

I am writing an API to merge two different JSON Objects. Both of these objects can have same as well different number of properties. Object 1 : { "name": "Sam", "lastName": "Hanks", "...
10
votes
2answers
405 views

Is it bad to have many contributors in a code repository?

Is it a bad thing to have a large number of contributors in a code repository? My current company has a really large repo. This repo has over 40 contributors. And there's a debate about whether or ...
1
vote
2answers
166 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) ...
0
votes
2answers
76 views

Private and Public version of repository with minor difference

I am developing an application that has some features which are only meant to be available to members of the company while the majority of the application is for public use. Having two separate ...
0
votes
1answer
228 views

Why Git won't easily enable programs to output their version (commit hash)

If I understand correctly there is no built-in functionality in Git to simply let the program output which version or which commit hash string it is when it is run. Why not? Would it not be a simple ...
-3
votes
1answer
55 views

Git base code to be shared to multiple branches

I have a code that is reused for multiple projects. I'm having hard time to maintain across all branches. What's the strategy to maintain all of my branches? Say if I have a base code in one branch, ...
1
vote
1answer
238 views

What are the possibilities to embed GIT into application in order to manage version control of the projects that were created by that application?

I am developing an C++ application, which creates tree like structures (collections) of strings. I want to add the ability to save the information of these tree structures remotely/locally (can be ...
-4
votes
1answer
124 views

Ways of managing multiple versions of software

I'm writing an IDE that will support many languages. I'd like to have a separate "version" of the IDE for each language, to avoid having a confusing number of seemingly unrelated features. I'd also ...
3
votes
3answers
99 views

How do I review a Git merge that had some manual conflict resolution?

I have two feature branches that were recently merged, and I'm trying to examine the diffs as an informal code review after-the-fact. feature1 with about 50 commits was merged into master and a merge ...
1
vote
2answers
157 views

Should i accept that a client adds changes to sourcecode on an ongoing development?

I'm currently in a situation (i'm a technical lead) where the client has modified on his own the source code, and i'm being told to accept the changes and keep working on that version. Technically he ...
-1
votes
2answers
255 views

Are pre-commit or pre-push hooks that run lint and unit test scripts worth it? [closed]

I guess the argument for pre-commit hooks that lint and run unit tests would be that every single commit is clean. The argument against them is that they take a lot of time to run, which can add up ...
0
votes
1answer
74 views

How to manage breaking updates in an API & database

So I have been working on my mobile app for a while and it is live and in production. Because we released the app prematurely and are continuously improving current features and making them more ...
1
vote
2answers
133 views

How to prevent overwriting changes in TFS version control by another team member

Background: I'm asking this question as a UI test engineer. We have a small software team using TFVC on a TFS repository. We use the mantis bug tracking system to follow up on issues. Here's the ...
1
vote
2answers
100 views

Managing the same files in four separate SVN repositories

We have four repositories in SVN, in which most of the files are same in all four of them. The reason why we are using four different repositories is, we have four different software products which ...
1
vote
1answer
165 views

Request changes to a commit message during code review on GitHub

I am trying to teach good engineering practices to my team, and in particular, walking them through the basics of PRs and code reviews on GitHub. One of my team members has sent me a request to review ...
41
votes
5answers
9k views

Is it better to merge “often” or only after completion do a big merge of feature branches?

Say multiple branches are being developed, A and B, as well as a incremental "bug fix" branch C. Now C is already "finished" and merged into master. A and B are still in development and will not be ...
2
votes
0answers
115 views

Gerrit: Working around the “single-change:single-commit” principle. Need Feedback

I have been using Gerrit in my work environment and I find it really amazing and powerful because of its elegant use of git's branching features to create virtual branches for code reviews (the "refs/...
1
vote
1answer
65 views

How to categorize configuration changes in semantic commit messages

I am trying to switch to semantic commit messages for project. While the idea is good, sometimes I find it is difficult to properly categorize changes like a configuration value change. If I commit a ...
0
votes
1answer
161 views

What is an interim version in Source Control?

I've been working on an open source project recently and have been checking out Core Infrastructure's best practices checklist. One of the items pertaining the "Change Control" checklist is as ...
0
votes
1answer
151 views

Any advice for Git workflow using branch per development team (and not per feature)

In our project, we have 5 teams working on a monolithic application in 3-week sprints. Until now, all commits go into master (via Gerrit). Our test pipeline is too lengthy to ensure quality pre-commit,...
2
votes
4answers
232 views

Should opportunistic refactoring happen in a different branch to functional changes

I'm not talking about the usual refactoring of new code you do as part of a development. This is more Boy Scout Principle type changes. While I understand why they're all made in the same branch, it ...
4
votes
3answers
251 views

What's the best approach when you need to work off two branches that still have pending PR requests?

Let's say I have branch-1 (branched off master (major update)) and branch-2 (also branched off master (minor update)). What is the best approach to do when I need to create another branch, e.g. ...
2
votes
2answers
314 views

How to approach long-lived feature code reviews in trunk based development?

My understanding is that trunk based development should rely on direct commits to master or short-lived feature branches that are merged with master. Incomplete work can be placed inside functions ...
-2
votes
1answer
251 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 ...
1
vote
1answer
192 views

Using semantic version with trunk based development for Python package

I am trying to understand trunk based development with semantic versioning for a Python project. Has anyone had any experience of adopting a trunk based development with semantic versioning for ...
2
votes
3answers
279 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
1answer
59 views

How to version control a fragmented codebase until it is properly merged?

My team has a mix of software developers and scientists, and version control has been messy in the past. We're trying to do better, which leads me to ask this question. We have a central codebase for ...
2
votes
1answer
136 views

How to manage same source code for different country in SVN?

as per my current requirement. I would like to maintain common source code for different country releases. Below are the cases which are required to be covered in the new process of code manage. ...
1
vote
1answer
106 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
229 views

What is a good method/practice I can employ to keep identical code snippits in two places in sync? Also, help documenting functionals

If I could get some input on the design of this, I would be grateful as well. Note that I'm programming in python. There's a function F that takes lots of data, runs some analysis on it (taking ...
4
votes
5answers
737 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
636 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 ...
0
votes
3answers
328 views

Protect Part of the Code

My company works with different developers from different studios, always sharing the code to everyone aboard. At the moment, we need to protect a part of the code, not from theft but from some ...
-1
votes
1answer
293 views

Best practice - Single or Multiple source code repository

As mentioned here: The main aim of CI is to prevent integration problems, referred to as "integration hell" Our project is a 3-tier web application, with frontend(Angular 6), backend(Springboot) &...
0
votes
0answers
29 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 ...
4
votes
2answers
232 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
votes
1answer
95 views

How to use Semantic Versioning on Existing Multi Component Codebase?

I am working on a multi contributor project, having ~2500 Commits. It has multiple components, i.e. Frontend, Backend and Data Processor/DB Ingestion. Now that we are expecting more contributors, a ...
0
votes
2answers
231 views

Are CCQ (Continuous Code Quality) tools like SonarQube expected to deny version control changes? [closed]

I am getting into SonarQube and everything looks quite and simple so far, but I am not sure what is the final purpose of CCQ overall. Yes it gives you a lot of tips about whats going on inside your ...
2
votes
1answer
55 views

Where to keep Ansible Inventory file

I keep my Ansible based deployment module in the same repository/directory as my application code. I use Mercurial for my VCS. The inventories file is ephemeral as the IP's of the cloud hosts keep on ...
2
votes
1answer
200 views

How do I work on a new project and simultaneously add generic code to a base library with version control?

I work on several projects and sometimes they share a common base. How do you work with version control? Here's an example: I've got a boilerplate Wordpress plugin that I reuse. On each new ...
0
votes
1answer
237 views

What are branching strategy pros and cons for 2 main types

So at a high level, we have multiple projects/solutions in company and we need to keep them in 1 source control. Since the number of projects is around 50, we are not creating individual repositories ...
0
votes
0answers
29 views

Source control Sql Server multiple shards with minimal differences

One of the database systems I work with (I'll call it database A) was essentially sharded into 3 schema-identical copies. This was easy to source control, and when a change was made to any of the ...
0
votes
1answer
100 views

Source Control Release Management: Simultaneous Releases with Different Configurations

This is a best practices question for release management of an app. But this scenario is a bit different than what I've been able to find myself. Essentially my company maintains a fork of its own ...
3
votes
1answer
266 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
vote
4answers
887 views

What are the risks of having a release branch?

Currently we manage our source code in a Microsoft Team Foundation Server project. We have the following branches: Development Feature 1 Feature 2 Etc. Test The process is that development is ...
1
vote
2answers
80 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 ...
9
votes
3answers
729 views

Keeping secrets out of source control - are we just moving the problem?

I inherited some projects in which secrets were in source control in App.config and similar files. Fortunately it's not a public repository so the risk isn't as serious as it could have been. I'm ...
3
votes
3answers
156 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, ...