Jenkins and Git: Local Branch No Longer Referencing Corresponding Remote Branch
I need help understanding the following: I'm running a Jenkins job to build out a project hosted in a remote git repo. I am checking out code to a sub-directory, and checking out specific local branch "test-1.1." I have a corresponding remote branch as well.
However, when I run the Jenkins build, and run
git branch -av, I get:
* test-1.1 f10e15e Commit Text2
* remotes/origin/test-1.1 818da9e Commit Text1
When I manually perform a git clone, and checkout to branch test-1.1,
git branch -av gives:
* test-1.1 818da9e Commit Text1
* remotes/origin/test-1.1 818da9e Commit Text1
It appears that the Jenkins build is doing the branch checkout differently, but I'm not sure how or what.
How would I get Jenkins to checkout the "test-1.1" (or any other) branch and be at the correct hash, and retain the reference to its corresponding remote branch? I could write a shell script, but would there be any other way of doing this that I might be missing?
Jenkins 1.544 with Git 2.0 plugin, CentOS 6.4.
I've been working on a local clone of a remote git repository, committing my changes to my local master branch. Now, I want to push my commits to the remote repository. However, I want to keep my loca
I find it confusing to that in git, to remove a remote you use 'remote rm'... git remote rm myremote ...while the syntax for deleting a branch requires the -d (or -D) switch: git branch -d mybranch
I was trying to track a remote branch with: $ git checkout -b --track global/master and git created a branch that is actually called '--track'+ Now when I type: $ git branch -D --track It won't dele
If I create branches on my local git repos like so: git checkout -b test then do a push git push I don't actually see the new branch test in my GitHub page. How do I make my remote branches mirror my
Git will by default deny deleting a local branch (via git branch -d mybranch), if that branch is not fully merged. However, if I delete a remote branch via git push origin --delete mybranch, there is
I merged my local feature branch “navDrawer” into my copy of the remote “dev” branch. When I sync’d “dev”, it also created a remote “navDrawer” branch. Now I have 3 remotes (master, dev, navDrawer). H
I know how to make a new branch that tracks remote branches, but how do I make an existing branch track a remote branch? I know I can just edit the .git/config file, but it seems there should be an ea
How would you accomplish this? mkdir newbuild cd newbuild git init git remote add origin git+ssh://user@host:22/var/www/vhosts/build $ git checkout -b origin/mybranch fatal: You are on a branch yet to
All the remote branches are visible as remotes in my local git repository after a git fetch. How to selectively remove the remote branches in my local repository(not in the remote repository).
Here is my current Jenkins setup for a project: one job runs all development branches one job runs all pull requests one job runs only the master branch one job makes the automated release only when
My .git/config: [remote origin] url = firstname.lastname@example.org:nfpyfzyf/test.git fetch = +refs/heads/*:refs/remotes/origin/* [branch master] remote = origin merge = refs/heads/master My local branches: HE
In git, I named a branch: parse() The name has been accepted, but when merging I get the error: git merge parse() bash: syntax error near unexpected token '(' Is it possible to rename a branch? Are
I have a local develop branch dev and a remote master branch. For the dev branch, I have a quite complicated commit history(nearly 20 successive commits). I tried to use git rebase -i origin/m
I have a deploy branch which differs from my master in that it contains various server-only asset files that I don't want polluting my master in development but I would like pushed to master on my ser
I am using GIT to share my code with my team. I am using eclipse as my IDE and I have installed Egit plugin to do all the git functionalists. The problem is I am not sure what are the correct steps I
On my local machine, I have a repository set up as the following * remote origin Fetch URL: email@example.com:me/my_project.git Push URL: firstname.lastname@example.org:me/my_project.git HEAD branch: master Remote branc
I have the following remotes set up: $ git remote korg rorg And the following branches: $ git branch -a * (no branch) remotes/korg/gingerbread remotes/korg/gingerbread-release remotes/korg/honeycomb
I'd like to delete a remote branch from my central git repository. The usual advice is to do 'git push origin :branchname' or 'git push origin :heads/branchname'. But when I try that, I get this error
I already googled, and read many document. but Unfortunately I cannot understand them all My situation is. git branch -r origin/HEAD -> origin/master origin/master origin/team/myteam git branch -a
Is there a way in git bare repository to push a branch that is not in HEAD right now? For example i have two branches: $ git branch * master another And i have two remotes set: origin and another. I
After I did a clone of a repo, a new branch test has been added to the origin remote. But I still see: $ git branch -a * master remotes/origin/HEAD -> origin/master remotes/origin/master What git
From here, http://cheat.errtheblog.com/s/git, I think I can recreate a branch in my local repository by $ git branch mytestbranch <then I can may changes as my experimental> My question is how
I cloned a remote repository in GIT and local master got created. Now, after a few days, it seems that remote Master has progressed. Is it possible to take update from remote master for only one singl
I'm trying to create a staging branch on Heroku, but there's something I don't quite get. Assuming I've already created a heroku app and setup the remote to point to staging-remote, If I do: git chec
how do I fetch a remote branch and update git's local ref for that branch without effecting the current branch? For example if I do this $ git pull origin master origin/master is merged into my curre
Problem: When my co-worker tries to push a new local branch to the repository, a new remote branch is not created. Instead, the commit from the local branch is pushed directly to the master branch. Ex
I cannot remove a remote branch called origin/featureBranch. I guess it's because the branch name starts with origin, but I am not sure: $ git branch -r | grep featureBranch origin/origin/featureBranc
Quick sanity check - I wanted to create a new remote branch for myself. I want to do the following: git clone email@example.com:orange/orange.git git branch foo git checkout foo git push foo foo I'd lik
I had a local branch which was branched off master quite some time ago, on which there were several commits. I wanted to get this local branch up to date with master so I did git co my_branch git reba
This is probably a dumb question, but I'm brand new to git and am seeing a remote branch that no longer exists. $ git branch -a * master remotes/origin/master remotes/origin/production I don't believ
I'm a little confused about git fetch and comparing differences . I have the following local branches; master remote/origin/master In master branch I have a text file which I make changes to, comm
Say I have local branch A off of origin/master. I am continuously making changes to branch A, fetching the remote master, and rebasing. Then I have local branch B off of A. I am continuously making ch
I have a local branch tracking the remote/master branch. After running git-pull and git-log, the log will show all commits in the remote tracking branch as well as the current branch. However, because
I have two directories on my local machine pointing to the same remote git repository. When I issue the command git branch -r in one of the directories I get a longer list of remote branches then in t
I have setup my local branch to track remote branch. when I do git pull, it said 'Already up-to-date'. But when I do git log, the latest checkin is on Dec 21, 2012'. And when I do git log remotes/bran
I accidentally did: git checkout mybranch git branch --set-upstream origin mybranch Git says: Branch origin set up to track local branch mybranch. How do I reset that and what could it do to me? Th
I'm using GitHub, when I git branch -a, it shows like this: master * develop remotes/origin/HEAD remotes/origin/develop remotes/origin/master remotes/origin/feature001 remotes/origin/feature002 remot
I have a local branch named 'my_local_branch', which tracks a remote branch origin/my_remote_branch. Now, the remote branch has been updated, and I am on the 'my_local_branch' and want to pull in thos
I messed my local branch of a project, and i want to revert my local copy to the remote state. How i acomplish that simply goal?
is there any shortcuts for current git branch? i would like to do something like this: $ git fetch origin $ git rebase -i origin/a_very_very_very_long_branch_name where, my local branch name is as sa
git branch -a shows both remote and local branches. git branch -r shows remote branches. Is there a way to list just the local branches?
When branch B does not exist locally, but is on the remote repo, git branch * A git branch -a * A remotes/origin/B How can i pull B to my local repo? Should i git checkout B first? Should i pull, wh
In another question it was recommend that I try resetting a remote tracking branch to an earlier commit and performing an import a second time. I can't figure out how to do that! I can reset master, b
Possible Duplicate: git: rename remote branch Hi, I want to rename a local branch that's also pushed as a remote repository how can I rename them both?
I did: git co upstream/master # To no branch. <then did a trivial edit on some file...> git commit -a -m Trivial edit git push origin NewBranch But got this: $ git push origin ignore-netbeans
After splitting my project in 2 branches, I have the following situation : Remote branch origin/master targets my local departements branch . I would like this branch to target my local master
This question already has an answer here: Checkout remote Git branch 11 answers I have a remote branch: git branch -a *master remotes/origin/develop Can I checkout to remotes/origin/develop ?
How can I reset the branch pointer of a remote tracked branch to one of its previous commits, so it looks like I didn't pulled (something similar like reset hard for local branches)?
I have a local topic branch that's tracking a remote branch. For the sake of argument, say the commit histories look like this: A--B--C--O1--O2--O3 (origin/phobos) \ L1--L2--L3 (phobos) Having looked
I have rebased a branch locally which was already pushed. Git is advising that my branch and remote have diverged and that: and have 109 and 73 different commits each, respectively Will pushing my b