Questions tagged [remote-branch]

142 questions
1
vote
1 answer

Strange remote branch in git

The git branch -a command gives me following output: master stable remotes/origin/master remotes/origin/restoring_entered_information_from_post remotes/origin/stable but there is no such a branch restoring_entered_information_from_post on Github, I…
Paul
  • 25,812
  • 38
  • 124
  • 247
1
vote
2 answers

Set remote branch to a commit we don't have locally

Some intern did a force push on master yesterday. After we've done scolding, ;) we looked at the result. Luckily, we had an almost up to date version of the master on one machine, only some pull requests have to be merged again. But one thing is…
iGEL
  • 16,540
  • 11
  • 60
  • 74
1
vote
4 answers

How to pull branches from remote source

How do I fetch back all the branches for my repository on Git? I tried the following: git remote add origin git@github.com:anchetaWern/Zenoir-Online-Classroom.git git pull git@github.com:anchetaWern/Zenoir-Online-Classroom.git I have 3 branches in…
Wern Ancheta
  • 22,397
  • 38
  • 100
  • 139
0
votes
1 answer

What is the purpose of git tracking branches?

I created a tracking branch so whowasout.com tracked whowasout.com/master $ git remote -v origin git@github.com:venkatd/whowentout.git (fetch) origin git@github.com:venkatd/whowentout.git (push) whowasout.com git@git01.phpfog.com:whowasout.com…
Venkat D.
  • 2,979
  • 35
  • 42
0
votes
0 answers

list remote branches has commit within 30 days

I am trying to get list of remote branch which has commit within 30 days and sort them. git fetch # List remote branches containing the name "selva" branches=$(git branch -r) # Create an empty array to store filtered branches filtered_branches=() #…
0
votes
1 answer

which branch is specified in these git push commands

what is the difference between : git push origin HEAD: git push origin CURRENT_BRANCH_NAME Is CURRENT_BRANCH_NAME the name of my local branch or the remote branch ?
user3443063
  • 1,455
  • 4
  • 23
  • 37
0
votes
1 answer

listing and switching /checkout to remote branch error

git ls-remote origin lists all the remote with their commit IDs, xxxx41 refs/heads/ABC xxxx92 refs/heads/dummy_xyz xxxx32 refs/heads/Feature/ABC xxxx77 refs/heads/Feature/ABC-mgc now when i checkout to any of the branch i get an…
cloudcop
  • 957
  • 1
  • 9
  • 15
0
votes
0 answers

git rebase remote branches

my project uses a (remote) master branch and plenty of (remote) feature branches. I usually start my work either on an existing (remote) feature branch or I create one. The real work is done locally of course, therefore I use git pull/push to keep…
stacky67
  • 66
  • 5
0
votes
1 answer

Git know the list of branches before cloning

Is there a way to know the list of branches a repository has before cloning? I tried the following command, but it doesn't seem to work for me: git ls-remote git@github.com:Username/project.git Edit solution: git ls-remote…
Paul
  • 3,644
  • 9
  • 47
  • 113
0
votes
1 answer

Can't push to remote branch after rebase with master?

So I have used git rebase origin/main on my branch - but I want to push these changes to my remote branch. However, whenever I try to use git push -f origin name_of_branch I get the following: ERROR: Repository not found. fatal: Could not read…
0
votes
0 answers

Restore remote branch to previous commit

By mistake I did few wrong commits. Now I want to restore my develop branch to a perticular commit-ID. I tried $git reset --hard 9f3df1996f435907575acafe922b22b88e6f10c4 HEAD is now at 9f3df19 Merge pull request #1 from txxxx/feature-1 This has…
AWS_Beginner
  • 382
  • 9
  • 21
0
votes
3 answers

hook to limit push to only one branch at a time

I’m trying to create a hook that blocks pushes to a remote repository if you are trying to push more than once branch. Here’s the hook: #!/bin/bash HG_EXE="/opt/csw/bin/hg" CHANGESETS=`${HG_EXE} log -r $1:tip --template '{node} '` i=0 for…
0
votes
0 answers

Git cannot fetch remote branch

I am attempting to run the command git checkout -b feature origin/feature I have a repository I've cloned down with the below lines with help from this question: (Git Clone is too slow) $ git clone --depth=1 git@URL/path/to/repository.git $ git…
0
votes
1 answer

How to restore the deleted remote gerrit branch

We are using Git & Gerrit, Couple of months back our Ex. Colleague (He was an Gerrit Admin) who had deleted a remote gerrit project branch. Now I have request to restore the deleted remote branch. Locally no one has the copy of that branch. As an…
user4948798
  • 1,924
  • 4
  • 43
  • 89
0
votes
1 answer

How to integrate svn branches into git branches with git-svn?

i have not much svn experience but i am used to work with git. I have the following svn repository structure and revisions. https://server/svn/solution/trunk/solution.sln @r100 https://server/svn/solution/trunk/project1/project1.csproj…
mrt181
  • 5,080
  • 8
  • 66
  • 86