
8 May
2018
8 May
'18
8:18 a.m.
I want to have a git repository accessed via ssh. Just for me, no plans to give anyone else access. Below is the transcript of what I did, how do I solve the problem at the end of git refusing to update a checked out branch? rjc@linux:/tmp$ mkdir orig rjc@linux:/tmp$ cd orig rjc@linux:/tmp/orig$ git init Initialized empty Git repository in /tmp/orig/.git/ rjc@linux:/tmp/orig$ ls -al > file rjc@linux:/tmp/orig$ git add file rjc@linux:/tmp/orig$ git commit file [...] 1 file changed, 5 insertions(+) create mode 100644 file rjc@linux:/tmp/orig$ cd .. rjc@linux:/tmp$ mkdir copy rjc@linux:/tmp$ cd copy rjc@linux:/tmp/copy$ git init Initialized empty Git repository in /tmp/copy/.git/ rjc@linux:/tmp/copy$ git pull localhost:/tmp/orig remote: Counting objects: 3, done. [...] >From localhost:/tmp/orig * branch HEAD -> FETCH_HEAD rjc@linux:/tmp/copy$ git push localhost:/tmp/orig fatal: The current branch master has no upstream branch. To push the current branch and set the remote as upstream, use git push --set-upstream localhost:/tmp/orig master rjc@linux:/tmp/copy$ git push --set-upstream localhost:/tmp/orig master rjc@linux:/tmp/copy$ ls -al > file2 rjc@linux:/tmp/copy$ git push -- My Main Blog http://etbe.coker.com.au/ My Documents Blog http://doc.coker.com.au/