Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [branch]

A "branch" is a term used in version control systems to represent an independent line of development. Depending on the system, a repository can contain one or more branches. Branches are merged when changes need to propagate from one branch into another.

2 votes
3 answers
35 views

Does git distinguish between the trunk of master and a merged branch?

Lets suppose I branch of from master (A) and make a commit there (B) and then a commit on master (C) and then merge them (D): B / \ A--C--D master Now is there something that sets C apart from ...
skyking's user avatar
  • 14.2k
-1 votes
0 answers
32 views

Looking to fix a broken Git repo

I got a pretty bad git repo, which I have been using for about 6 months. This is a quick example of the git tree. * 7a740f7 (HEAD -> e/translation/report, origin/e/translation/report) * 8177bb6 (...
SuperSIlly2's user avatar
1 vote
2 answers
20 views

git can't delete remote branch because of distant ref/head

I work on several computers and use a bare repository on HDD to synchronize them. It works fine but I have a problem with a specific remote branch : I define a temporary branch newDev to ...
Nimu Nobdy's user avatar
1 vote
2 answers
31 views

how to get branch name in Gitlab ci/cd

i have a gitlab ci config like this simple build : stage: build script: # i want to echo branch name here rules : - if: $CI_COMMIT_TAG i want to echo branch name as a variable i tried ...
eby64's user avatar
  • 11
0 votes
1 answer
42 views

how to know if I can contribute to a branch with Azure rest Api?

with Azure Devops REST API, I would like to know if I have the permission to contribute to a specific branch, I found the request to know if I have a permission but it only work on a repos, but not on ...
Titouan Ferdoel's user avatar
0 votes
0 answers
36 views

Is it possible to get the latest branch name for a git commit that is in several branches

I'm trying to get the branch name for a commit in git. I'm using the following command: git name-rev --name-only --always --exclude=tags* HEAD but if the commit pointed by HEAD contains several ...
sagi's user avatar
  • 522
1 vote
1 answer
41 views

Multiple commits are showing while merging hotfix in develop branch - Git

Current Git structure I created a ticket branch from the develop branch and made some changes. After the release, I merged my ticket branch with both the main and develop branches. Now, I need to ...
Nikhil Rane's user avatar
0 votes
2 answers
47 views

Optimizations in branching if statements

I'm writing custom execution time formatter function for Nushell, and came across the need to display values when they are needed. First, take a look at the code: def tooktime_fmt [exect: string] { ...
Futman's user avatar
  • 13
0 votes
1 answer
27 views

Is there a way to safely but thoroughly forget a git branch after it is deleted?

It is handy to be able to press the tab key and get automated command completion, such as to fill out the remainder of the name of a branch. However, if one types... git switch de[tab] ... and there ...
Eric's user avatar
  • 483
0 votes
1 answer
28 views

Select specific branch in checkout OR identify checked-out branch

We are using an ansible setup with roles, templates, central repos, etc for our deployments. And are working on creating a new deployment pipeline where the source branch of 1 of the involved repos ...
wimfrits's user avatar
0 votes
0 answers
36 views

Enable a GitHub branch protection rule that can be overridden by force, but only intentionally

I would like to create a GitHub branch-protection rule that I can override, but only intentionally. Currently, I can protect a branch with a rule (e.g., "Require a pull request before merging&...
Mead's user avatar
  • 388
0 votes
0 answers
40 views

How to find the worktree path of a branch

Let's say I'm inside a Git repo with worktrees. Given a branch name, how can I find out if this branch is checked out in a worktree, and if so, the path to this worktree? P.S. this is for a script, I ...
Jordan Barrett's user avatar
0 votes
0 answers
26 views

Creating Git Tag to a repository

I am checking out 3 repos and out of which 1 repo is from Github and other 2 are from bitbucket. While creation of Tags, I want to create it only for the one which was checked out from Github, and not ...
Kivi's user avatar
  • 525
0 votes
0 answers
46 views

How to compare files from .war file with a branch

I need to compare a .war file (it's like a compressed file with all file project on it) with a master branch. I have a script to compare 2 branches, I need to compare a file (or folders btw) with my ...
Milton Ribotta's user avatar
-1 votes
0 answers
11 views

How many codelines can be defined in this system?

I have a question about codelines and baselines as I'm struggling to understand everything. I just want to know how many possible codelines exists for this system and what are they? system version ...
Benjamin Peljto's user avatar

15 30 50 per page
1
2 3 4 5
365