git “Your branch and 'origin/master' have diverged” after fresh clone of remote repo
When I clone a remote repository with
git clone 'repo_url'
I get this message -
On branch master
Your branch and 'origin/master' have diverged,
and have 41 and 20 different commits each, respectively
When I use
git pull -a I do not have this issue.
Are things out of sync on the remote repo? with the HEAD and the master ? How do I fix it?
EDIT 1 :
when I run git branch -a : this is what it looks like...
$ git branch -a
remotes/origin/HEAD -> origin/master
EDIT 2 :
It seems to me that origin/master is not pointing to the latest code... I ran 'git clone ' then
git reset --hard origin/master and then a 'git pull' and it attempted a merge which failed due to conflicts...
I think... The HEAD of the remote repo is pointing to the latest commit, origin/master is pointing to a different, older commit... I can verify this when I run git show...
When I run git branch -a I get this: master origin remote upstream web_search remotes/origin/HEAD -> origin/master remotes/origin/ba remotes/origin/insur remotes/origin/master remotes/origin/mv re
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
I have cloned a SVN repo with the command git svn clone ... --trunk=trunk --tags=tags --branches=branches. The operation have been correctly executed, and now when I list my branches I have all the pa
I'm following the git basics guide at http://git-scm.com/book/en/Git-Basics-Getting-a-Git-Repository, and after having had my initial question answered at Can't clone git repo using git clone git://..
I have a git repository with two branches. If I clone my repo I can only see the master branch. I have both branches up to date. The problem is I don't fully understand merging and branching. Darn it!
My local tree has diverged from the master: $ git status # On branch master # Your branch and 'origin/master' have diverged, # and have 7 and 3 different commit(s) each, respectively. # nothing to com
After changing origin remote URL (it was moved) and doing a git update, I found myself having a repo that has every commit & branch double (up to the point of my last fetch before). However, gitk
I am new to git. I have an issue where I get this message when I checked out a local branch: Your branch and 'origin/master' have diverged, and have 5 and 4 different commits each, respectively. (use
I have the following me@mba ~/Documents/myproj$ll total 8 drwxr-xr-x 13 punkish staff 442 Sep 5 15:13 .git/ -rw-r--r-- 1 punkish staff 193 Sep 5 13:28 foo.pl me@mba ~/Documents/myproj$git clone --bar
My remote Git repository has 3 branches: master develop news When a dev change he will branch off develop such as issue123. When he finished changing, he will push to remote issue123. I will merge
Cannot find any of the files on my remote repo. Created a GIT repo on shared hosting (site5) as described by their tutorial init'd it and added a simple text file. OK Cloned on to my local (WinXP) ma
My .git/config: [remote origin] url = email@example.com:nfpyfzyf/test.git fetch = +refs/heads/*:refs/remotes/origin/* [branch master] remote = origin merge = refs/heads/master My local branches: HE
So I am trying to push a repo from my localhost to my VPS. I have setup a --bare repo on my vps and a repo on my localhost. I have used the following commands to push to the VPS: # git remote add orig
I have one problem, I have been reading about that but I am not sure which solution is correct and as of now I am unable to test which solution is the right one. So, I am working on a remote branch, c
So I had a changes to a bunch of files, and then created a new branch and pushed them to a new remote branch as follows: git status # lots of changes listed git checkout -b new-branch git add . git co
I am a complete Noob when it comes to GIT. I have been just taking my first steps over the last few days. I setup a repo on my laptop, pulled down the Trunk from an SVN project (had some issues with b
I have a git repo on a remote linux box and another repo on a windows machine. I would like to: checkout a branch from the linux machine work on it locally(from my windows machine) commit locally
We're using GitHub here. I have a friend who branched our master branch, and I want to checkout his branch, make a few mods, then put them into his branch. My thought is to grab his branch using git c
I have two repositories origin and fork. I cloned origin locally and added fork as a remote repository. I now created a new local branch, e.g.: git checkout master git branch new git checkout new I m
I just added a remote (repo?) using the command: git remote add my_remote_repo firstname.lastname@example.org:/g_my_remote.git I was expecting this Repo to show up in the beanstalk. Or may be I am missing
I have a git repo for my project which is loosely based on GitFlow. I have a master branch, development branch (where all the work gets done) and a release branch. My repo depends on a few submodules,
I have a local git repo, and I have a remote git repo. What is a simple command to see what commit the remote repo is, and what commit the local repo is, so I can simple see if I'm up to date? This is
I have a local branch test, and I want to rebase off of the remote branch test, how would I do this? I have tried git rebase origin test, but the changes someone pushed a short while ago arent being r
When I run git push, my local branch some_branch is pushed to a remote branch some_remote\some_branch. When I run git remote show some_remote I get: Local refs configured for 'git push': [cut] some_
Is it possible to get commit logs/messages of a remote git repo without git clone? The git repo I am working with is huge, even if I run git clone with --depth=1 still takes sometime before I am able
I cloned a public repository (in this case, Pressflow/Drupal) into a bare repository on our internal shared repo, then I cloned that one into a non-bare repository to be used on a developer machine. I
I have a SVN repo and would like to use git from now on. I tried to clone the repo with 2 approaches. Normal SVN checkout git svn clone The first approach did just fine. Everything is fine and the p
I created a branch, worked on it, merged it with the base branch and now want to delete it. The branch was created on the git remote server as well. Now when I ran git branch -d branch, it removed it
I'm trying to clone a project that is remotly located to my local machine. So: 1) I navigate to the local folder where I want to have my files. 2) I connect to ssh on the remote machine: ssh something
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
I'm working on a remote branch named sidebar, created like this (from my pc, not remote repo) : $ git branch sidebar $ git checkout sidebar $ git push -u origin sidebar $ git pull origin sidebar Afte
I have cloned a git repo locally. I have made a number of commits to master branch and not pushed into remote. In the meantime, others have added to the master of remote. Now I want to keep my commits
Accidentally I forgot to open a new branch and committed my changes to the master, but haven't pushed them to the remote repo. Now I have the message : Your branch is ahead of 'origin/master' by 1 co
I have forgot to create local branch and was working with remote. After making some changes, i by mistake using Eclipse Git plugin commit this branch in nowhere(obliviously there wasn't local branch).
I cloned a repository and got a master branch. From the master I created a local branch abc. Now the remote may have progressed. The branches look like this: >git branch -a * abc master remotes/o
I am trying to set up a local repository (LOCAL_REPO) from some git branch (MASTER) which is to be used by a group of people. MASTER------>LOCAL_REPO To do this i did the following : git clone /p
I want to clone the public Linux master branch from Kernel.org so I can experiment with the code on my personal computer without affecting the public branch. I have already performed git clone and a c
I am on a repo on github. I have one local branch called : master and on the remote repo there are two branches, branch1 and branch2. I cloned the repo from the branch1. But then, I wanted to pull bra
After reading this article, it makes sense to rebase to gather changes from the main branch on to my feature branch: git workflow and rebase vs merge questions clone the remote repo git checkout -b my
I want to run a simple bash script after a git clone was made, that checks the url of the repository origin and applies specific git-author settings. this configuration shall be done on the local envi
When using git, git ls-remote returns status code 128 while any other commands work flawlessly (push/pull/clone/etc). My repos are being managed with gitolite. I'm getting this error when trying to de
I was working on some code, which didn't have any kind of git repo set up. I ran: git init git remote add origin http://giturl.git then I ran git add -A and realized I forgot to create a .gitignore fi
I am very new to git and wondered how I should go about a merge where in the local repo I have deleted several files on the master branch but these files exist within the remote master branch. After d
I recently delete all file from current branch, with rm --cached command without delete .git folder. Then staged just one file in current branch. But when I try to push that file to remote repository,
I have 3 places A, B, and C where I want to checkout/clone different, possibly intersecting, subsets of repo R. I would prefer that whatever means is used to mark these subsets is a permanent part o
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 am tracking remote repo which have files with dos endings (CRLF). I want to get local one which uses just LF, but I do not want to introduce changes in endings since I need to regularly merge with u
I have a Git repository that has branch (local and remote) that has become outdated. I would like to bring this branch up to date with the master branch, but I don't know how to do this. There will al
I know my ssh configuration works because I can just type ssh myAlias.ssh and connect just fine. I'm trying to use the command hg clone ssh://myAlias.ssh//path/to/repo and getting a remote: ssh: Could
I have cloned a repo using git. Another user created a new branch, call it foo (there are so two branches master and foo). I created another branch foo to track remote foo. So I ran this command : git