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.
branch
5,471
questions
-1
votes
0
answers
30
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 (...
1
vote
2
answers
19
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 ...
1
vote
2
answers
30
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 ...
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 ...
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 ...
1
vote
1
answer
39
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 ...
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] {
...
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 ...
0
votes
1
answer
27
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 ...
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&...
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 ...
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 ...
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 ...
-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 ...
-2
votes
0
answers
41
views
Git: changes getting overwritten
Sorry if this has been answered before, but none of the suggested answers coming up for this topic shows an answer for something similar to my problem.
Disclaimer: our method of branching may be ...