I have machine1 with git repo client, which has branches master and fixes_v3. I have machine2 and no matter what combination of things I try it pulls a branch and names it fixes_v3 but has the content of master. e.g.:
git clone git+ssh://user@machine1/home/user/client gives me this
git pull gives me this
git branch -a then checkout the remote fixes_v3 gives me this
git fetch gives me this
As well as various other combinations of these things, often starting over, aggregated from various SO questions, manuals, official documentation, etc. I don’t even know where to begin researching this without having to learn git from scratch for the nth time.
How to get the code in fixes_v3 instead of just an improperly named branch fixes_v3?
Edit for requested output:
um@machine2:~/client$ git show-ref
ae10bcf7e15a4e251b50e8bc2eae3e5a2bc25b63 refs/heads/fixes_v3
ae10bcf7e15a4e251b50e8bc2eae3e5a2bc25b63 refs/heads/localfixesv3
ae10bcf7e15a4e251b50e8bc2eae3e5a2bc25b63 refs/remotes/origin/HEAD
ae10bcf7e15a4e251b50e8bc2eae3e5a2bc25b63 refs/remotes/origin/fixes_v3
ae10bcf7e15a4e251b50e8bc2eae3e5a2bc25b63 refs/remotes/origin/version3
um@machine2:~/unrollclient$ git ls-remote origin
um@machine1 password:
ae10bcf7e15a4e251b50e8bc2eae3e5a2bc25b63 HEAD
ae10bcf7e15a4e251b50e8bc2eae3e5a2bc25b63 refs/heads/fixes_v3
ae10bcf7e15a4e251b50e8bc2eae3e5a2bc25b63 refs/heads/version3
7bd4490e8f98d29c5e82f473d1b04e542b67dec0 refs/remotes/origin/HEAD
16c7b55e2ea3e26c2f8faccd43e1c0db9620008a refs/remotes/origin/Testing
a7a5642f6766332910c2c9005e8aafaf456f1f58 refs/remotes/origin/john
7bd4490e8f98d29c5e82f473d1b04e542b67dec0 refs/remotes/origin/master
ae10bcf7e15a4e251b50e8bc2eae3e5a2bc25b63 refs/remotes/origin/version3
um@machine2:~/client$ git remote show origin
um@machine1's password:
* remote origin
Fetch URL: git+ssh://um@machine1/home/um/client
Push URL: git+ssh://um@machine1/home/um/client
HEAD branch (remote HEAD is ambiguous, may be one of the following):
fixes_v3
version3
Remote branches:
fixes_v3 tracked
version3 tracked
Local branches configured for 'git pull':
fixes_v3 merges with remote fixes_v3
localfixesv3 merges with remote fixes_v3
Local ref configured for 'git push':
fixes_v3 pushes to fixes_v3 (up to date)
Question turned out to be even dumber than I thought. Changes in fixes_v3 branch were not committed… after re-reading the git pro guide I was able to understand git well enough to troubleshoot such a basic step. Thanks everyone.