git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Commit changes to remote repository

From
Rruperty <rupert@moonsit.co.uk>
Date
Jan 13, 2012, 20:29 UTC
Message-ID
<1326486589088-7185551.post@n2.nabble.com>

Being new to git I am probably not doing things correctly so pointers in the right direction would be useful.

What I want to do make changes on my laptop and commit them to a remote repository. Here is what I have done,

1. Created a repository on my remote linux host, in a folder of cource code,
by,
   git init
   git add *
   git commit
2. On my laptop I did a git clone pointing by ssh to the remote repo which
downloaded all the files to my local system.
3. I changed a file locally and did a commit.
4. I then wanted to update the remote repo with my change, which I did with
a git push, but that didn't work, getting this error,
    remote: error: refusing to update checked out branch:
refs/heads/master
    remote: error: By default, updating the current branch in a non-bare
repository.......
What am I doing wrong?

I was following the tutorial at http://book.git-scm.com/3_distributed_workflows.html

I did search for this issue in this list but didn't understand the responses.

Rupert

-- View this message in context: http://git.661346.n2.nabble.com/Commit-changes-to-remote-repository-tp7185551p7185551.html Sent from the git mailing list archive at Nabble.com.

Next: Carlos Martín Nieto
Message 1 of 4 in “Commit changes to remote repository”
  1. rupertyJan 13, 2012
  2. Carlos Martín NietoJan 14, 2012
  3. Matthieu MoyJan 14, 2012
  4. Junio C HamanoJan 17, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.