Skip to main content

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.

Filter by
Sorted by
Tagged with
0 votes
2 answers
41 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
21 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
0 answers
18 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
27 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
35 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
23 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
39 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
10 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
-2 votes
0 answers
39 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 ...
Kobus Myburgh's user avatar
-1 votes
1 answer
17 views

There is a malfunction in my local repository branch

Yesterday, I encountered a commit conflict while fetching from my upstream. In my limited knowledge, I deleted the file with the commit conflict from my vs code. Now, I tried to fetch from my upstream ...
Uduak Etimfon's user avatar
-1 votes
1 answer
35 views

GIT List all files that have been committed directly to my branch

We have a production branch from which we branch off feature branches. At certain times we put together a release with all features that are ready for production. The branches then get merged back to ...
frank's user avatar
  • 3
1 vote
0 answers
33 views

git diff a file against the multiple files it was split into

I have a file A on branch old_branch that exists as multiple files A, B, C on a different branch new_branch. I need to merge old_branch into new_branch which would require me to resolve the merge ...
Andr0id16's user avatar
0 votes
0 answers
24 views

Isolate repository subdirectory into a separate branch

How do I break a subdirectory from main and push it onto a new branch (preferrably without disturbing the history of main in the process)? I don't really care about the sub history. Currently I have ...
CCheukKa's user avatar
0 votes
0 answers
32 views

When creating a new depository what's the real purpose of -M in git branch -M main?

I'm creating a new depository and I have to comment exactly all these code lines : """ echo "# fleurs" >> README.md git init git add README.md git commit -m "first ...
Alejd's user avatar
  • 1
0 votes
0 answers
13 views

branch analyze using Jenkins

I know ther is branch analyzing in SonarQube Is ther similar thing in Jenkins? or any way to analyze branches using Jenkins? I looked it up documents from Jenkins and there was multibranch pipeline ...
user25550487's user avatar
0 votes
1 answer
26 views

Configure git to automatically track _specific_ (different) remote branch when creating branch locally

Imagine I have a repo with two branches A and B. I clone it: $ git clone [email protected]:group/project.git $ cd project I checkout A: $ git checkout A Branch 'A' set up to track remote branch 'A' from ...
Cameron Ball's user avatar
  • 4,088
0 votes
0 answers
28 views

Old branches on remote cannot be deleted [duplicate]

I have been extensively looking for this, but none of the online replies worked for me. I have a git repo, on local I have only the master branch % git branch * master however, a number of old ...
James's user avatar
  • 453
2 votes
0 answers
81 views

How to avoid such terrible codegen (SIMD->memory spilling) on MSVC with branches?

For this code: #include <immintrin.h> [[gnu::target("avx2")]] [[msvc::noinline]] void f(void *a, bool c, long long &d) { using V = __m256i; V v = ...
user541686's user avatar
  • 208k
0 votes
0 answers
12 views

configuration queryparameters in Branch.io

this is a part of backend code: $query_parameters = [ 'item_id' => $id, 'item_name='.$item_name ]; $query_setting = http_build_query($query_parameters); $...
Vahit Behrouz's user avatar
0 votes
0 answers
30 views

Running a pipeline on a protected branch in GitLab

We set up a containerized GitLab instance recently and we're trying to set up CI/CD pipelines to run on our repositories. We have the runners set up and working, and as we created these repositories, ...
YasserL's user avatar
0 votes
0 answers
13 views

Creating Branches in VSCode get associated with my GitHub Account, but Commits don´t

when I create a branch in VSCode via "git checkout -b test" a new branch is created on Github and its shown as "My Branch". So there is a connection between my VSCode and GitHub. I ...
Nico Bock's user avatar
0 votes
0 answers
12 views

Issue with Github compare after a revert

This is the layout of my Git projects. Master < Dev < Dev2 I have been working on changes on Dev2 for months, and recently moved them up to Dev to get ready for deployment. In the mean time a ...
Yankeecandle's user avatar
0 votes
1 answer
104 views

Dynamic values into pipeline resource branch value

I want to provide every time different branch name for download artifacts in azure devops. I have code like this resources: pipelines: - pipeline: Pipeline_name # Name of the pipeline resource ...
Bartosz Kowalski's user avatar
1 vote
0 answers
19 views

Regarding REL label is restricted when we try to apply by using core view

**view **: cint_c1a_8ch_shift_RN_C1A_SHIFT Label name: REL_C1A_SHIFT_SW_SOP_HWD01_SW04_V00_CGW_REN_NIS_C1A_8CH_SHIFT cint_c1a_8ch_shift_RN_C1A_SHIFT_3 config spec of view: element lost+found -none ...
nikhil kishan's user avatar
0 votes
0 answers
9 views

How to label or add a metadata comment to branches in Github.com

In Github.com, we have ~300 branches on a repo - it's hard to keep the repo tidy. Some of them can be removed, but it's a large project, so we don't all know each other to know if it's safe to do so. ...
Jason H's user avatar
  • 121
1 vote
1 answer
48 views

How can I undo someone removing git history on master branch?

I am working on a school project and someone in my group pushed their code very late at night, however there were a couple of major issues: They pushed straight to master, not on their own branch. ...
MattyBRappps's user avatar
1 vote
1 answer
77 views

git GitHub remote branch push cannot be resolved to branch

Trying to push to a GitHub Repository, to a branch named Kedabra, did init checkout clone fetch add . and when I push y get the error "Kedabra cannot be resolved to branch". git remote add ...
Kedabra's user avatar
  • 56
1 vote
1 answer
71 views

How to make a git branch the descendant of an other without changing its content?

I have two branches, 2 and 4: 2c <- top of branch 2 | 2b | 2a <- root branch 2 and 4c <- top of branch 4 | 4b | 4a <- root branch 4 The ...
kitatech's user avatar
3 votes
0 answers
365 views

The chat history is being recorded twice, using both RunnableWithMessageHistory and RunnableLambda from LangChain

As shown in the following code, I want to create a branch in RunnableLambda, and at the destination of the branch, I want to use RunnableWithMessageHistory to generate a response considering the chat ...
Keita Kiuchi's user avatar
11 votes
0 answers
186 views

Xcode loses package dependencies when switching git branches

Since Xcode 15, every time my colleagues and I switch git branches (we do this a lot), Xcode seems to "lose" the package dependencies. If we don't notice it immediately, we notice as soon ...
Baldman's user avatar
  • 111
0 votes
1 answer
119 views

Branch.io live keys should be private or public

I'm kind of lost in the documentation of Branch.io regarding the right implementation of Branch.io live keys, i'm merely wondering whether Branch.io live keys are safe to be embeded in client side ...
B.Djo's user avatar
  • 1
0 votes
0 answers
34 views

Feature Branch Needs to Be Split Into 2 Unique Feature Branches But Commits Are Not Distinct

I have branch cool-new-feature that is going to be in the works for a few months. While working on this new feature I also refactored a large number of files. The refactored code is used throughout ...
Yumpkin's user avatar
  • 11
3 votes
0 answers
53 views

Best practice for managing requirements.txt in develop/main branches?

Our product uses a requirements.txt file to specify required third-party packages. In the development code branch, our practice is to not use any pinned versions in this file, so that we always get ...
John Gordon's user avatar
  • 32.4k
0 votes
0 answers
24 views

Xcode commits (possibly outside of any branch) disappeared, how to get them back?

This could be something I overlooked, that the commit is not actually under any branch, and now it cannot be seen under Xcode -> Source Control navigator -> Repositories The only place that ...
chdsl007's user avatar
0 votes
2 answers
58 views

How to fix "this branch is 1 commit behind of master branch"

I am working on android studio and am fairly new to GitHub. I created a new branch diverging from origin/master lets name it "newCommits", I added a new functionality and made 1 commit to ...
Rishi Matura's user avatar
2 votes
1 answer
118 views

How can I merge these two branches?

First of all, I just started to learn git. I want to merge the red branch into the others, but there is no merge button. In fact, essentially, I don't know why they are seperated.
KTY's user avatar
  • 25
0 votes
1 answer
43 views

Is there any way for QA to do the feature testing before each feature merged to sacred branches?

I'm a Laravel developer working on some Laravel projects. I want to know if there any best way to do development cycle. In this case, I store my project in version control system such as Gitlab. I ...
skadevz's user avatar
  • 59
0 votes
0 answers
88 views

speed up git clone when remote have so many branches

We have a git repo that have more than 30 thousands branches. When i run time git clone http://<gerrit-host>/manifest.git, it stop at Cloning into 'manifest'... for about 1 minutes and 20 ...
Aylwyn Lake's user avatar
  • 1,947
1 vote
2 answers
34 views

Cleaning master branch to version from another branch, but save progress to new temp branch

What is the best way to move all progress on the master branch from point X to a new temporary branch (e.g., new_master), rewind all changes to point X, and finally commit all changes from branch A as ...
Nolias's user avatar
  • 111
0 votes
1 answer
28 views

Feature and origin/Feature are separated in a Y shape

I was reading some code in a repository in which I have to work in a branch called Feature1. While doing it, another member has changed the structure of the branch so now that I have done git fetch ...
KansaiRobot's user avatar
  • 9,073
0 votes
1 answer
27 views

Git how to pull the update from original repository and keep my own changes

should i clone-branch or fork-clone-branch. the original repository is Tom's project in github, but i want to make some changes, and keep my changes while can keep updating or pulling update from ...
QQTT's user avatar
  • 1
0 votes
0 answers
100 views

Pull request from feature branch into test branch shows changes that are already inside test branch

Using azure devops, I was merging a feature branch into test with some new changes. I am not yet fluent in git, so my process is always via VS Code git options for merging, pulling and pushing and ...
Bernard Polman's user avatar
2 votes
1 answer
277 views

Git rev-parse --abbrev-ref HEAD vs branch --show-current differences in a new init project

I took an empty project with just one newly created file, I ran the git init command, when I run the commands below I get the following results: command: git rev-parse --abbrev-ref HEAD output: HEAD ...
Paul's user avatar
  • 4,302
0 votes
1 answer
243 views

ADF Publish Fail - Invalid references or dependencies found

I am working on creating ADF pipelines and whenever I am publishing my pipeline changes I am keep getting this error - Invalid references or dependencies found. This is likely due to publishing ...
Xoxo's user avatar
  • 1
0 votes
1 answer
44 views

Merge dev to stage but only specific commits

I want to merge my dev branch into stage but there are some commits that should not go to stage. One solution is to use cherry-pick but there are just too many commits to cherry-pick so it is not ...
Ahsan Ahmad's user avatar
0 votes
0 answers
119 views

Odoo 17 Branches Configuration

I’m configuring Odoo enterprise and I’m struggling to set branches properly. In my case the branches are not legal entities, I need the branches to use different emails and to control the expenses and ...
Carles Estevadeordal's user avatar
0 votes
0 answers
24 views

Is there a setting to reactivate "Create new branch" when switching branches?

In previous versions of vscode it was possible to switch branches and instantly creating a new, if it does not exists. That doesn't work anymore because the "Create new Branch" DropDown ...
Loading...'s user avatar
1 vote
1 answer
737 views

Write access to repository not granted

I connected to the git-repository with a command: git clone https://<username>:<token>@github.com/<organizationname>/<repo>.git And now when I try to do the command: git push -...
maia's user avatar
  • 19
0 votes
1 answer
96 views

How to lock a file in Azure Repository

We have a requirement to lock a particular file in azure repos and not allow anyone to modify the file. I have seen a similar thread and talks about locking the branch and adding branch policy - Can ...
ram prasad's user avatar
1 vote
2 answers
330 views

Is there a way to restrict branch creation pattern in github?

I have a main branch and if someone wants to create new branch then it must start with feature/*, bugfix/*, release/*. I tried using branch protection rules, but I couldn't find any settings that ...
Ainz's user avatar
  • 21

1
2 3 4 5
110