Questions tagged [git-refspec]

Use git-refspec for questions related to the the mapping between a local branch name and a remote branch name.

References

37 questions
1
vote
0 answers

Configure git to always fetch only current branch and master

Is it possible to configure git to, by default, when using git fetch, fetch only the current branch and master from the remote, without explicitly mentioning the current branch name? I know that I can achieve this exact fetch with this command: git…
Klas Mellbourn
  • 42,571
  • 24
  • 140
  • 158
1
vote
1 answer

Git: what is the difference between dev and refs/heads/dev?

From recent work in devops, it seems as though there are "two ways" to check out a branch in git: using the plain branch name, e.g. dev, or using the branch name prefixed with refs/heads/, e.g. refs/heads/dev. What is the difference between the…
StoneThrow
  • 5,314
  • 4
  • 44
  • 86
1
vote
1 answer

Not able to use NERModel due to import issue from SimpleTransformers

I'm trying to use SimpleTransformers module for this competition. After successfully installing the package SimpleTransformers in kernel , i'm trying to import NERModel and NERArgs packages from simpletransformers.ner. But i get error message as…
1
vote
1 answer

warning: refname 'HEAD' is ambiguous - but no HEAD branch

I've been generating a few git repositories from CVS repositories using the crap tool (it's not crap!...) Unfortunately, with one of them, and after the export, I keep getting complaints about HEAD being an ambiguous reference. I've read: warning:…
einpoklum
  • 118,144
  • 57
  • 340
  • 684
1
vote
1 answer

Git push Refspecs: `refs/heads/*:refs/heads/origin` vs `refs/heads/*:refs/heads/*`

Which push Refspec (Git) is correct? Or both are correct? What is the difference? refs/heads/*:refs/heads/origin/* refs/heads/*:refs/heads/* I prefer (1) because it references remote name (origin), and I don't understand what (2) means (but I see…
Code Complete
  • 3,146
  • 1
  • 15
  • 38
1
vote
1 answer

Can a git refspec include multiple wildcards?

Running git ls-remote origin on a repo I have access to, I see branches of the following form, using git namespaces. refs/namespaces/share/refs/namespaces//refs/heads/ I'd like to map these to…
Eric
  • 95,302
  • 53
  • 242
  • 374
1
vote
1 answer

Git fetch objects, no refs

I want to fetch objects from a remote repo, but not update any local refs. (Yes, I know this is an rather unusual case.) I see that I can pass a refspec to git fetch, but when I pass an empty one (git fetch my-remote ''), it seems to default to…
Paul Draper
  • 78,542
  • 46
  • 206
  • 285
0
votes
0 answers

Issues error: cannot lock ref when fetch data on server

I got an issue when fetch new commits merged to. I know how to resolve the problem with prune locally. But the problem is at server and I can not ssh to (just run CI/CD set up before). How can I resolve the problem with my local repository and push…
Phát Lê
  • 11
  • 1
0
votes
1 answer

What is the + for in a git refspec?

This https://git-scm.com/book/en/v2/Git-Internals-The-Refspec says The + tells Git to update the reference even if it isn’t a fast-forward. What does this mean?
Snowcrash
  • 80,579
  • 89
  • 266
  • 376
0
votes
1 answer

Git fetch tags only on a specific branch?

I am using git fetch origin feature/blabla to be really specific what I want to fetch. However this does not fetch tags which are currently on feature/blabla. A git fetch only (supposed the branch is checkedout) fetches the tags too. Is it…
Gabriel
  • 8,990
  • 6
  • 57
  • 101
0
votes
0 answers

What is a original/refs/remotes/... branch in git

I am using git for my project. During that I get some strange branches. If I use gitk to analyze, I can see that the name of these branches is something like original/refs/remotes/origin/ There is also a local version of this branch.…
NelDav
  • 785
  • 2
  • 11
  • 30
0
votes
1 answer

Error pulling refs/notes/review from gerrit (non-fast-forward)

git pull request is failing each time because a change in refs/notes/review in the remote gerrit instance cannot be fast forwarded. I did (hard) reset the local branch to be in sync with the remote branch but that doesn't help with this (git reset…
Meursault
  • 77
  • 2
  • 10
0
votes
2 answers

can "remote branch", "remote-tracking branch" and "tracking branch" have different names?

I am playing around with git. Current status: 1) my local repo has one branch master_local. 2) the remote repo has one branch master_remote. (the remote's name is hehe_server) 3) my local .git/config looks like [core] repositoryformatversion =…
halfmoonhalf
  • 107
  • 7
0
votes
1 answer

Push from remote branch to different remote branch

If I want to push the contents from a remote:master to the same remote but a different branch, how can I do this? With git push remote.git master:mybranch I can push the local repo into the second branch But what I'd like is push not from the local…
GWorking
  • 4,011
  • 10
  • 49
  • 90
0
votes
1 answer

SourceTree failed to push some refs

I cloned a repository from BitBucket. After I made some simple changes in the code I did a commit. However, I am not able to push. The following error appears: git -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree…
Marc
  • 71
  • 15