Arc Forumnew | comments | leaders | submitlogin
2 points by randallsquared 4769 days ago | link | parent

Okay, can someone point me at a good tutorial that talks about how we're supposed to commit with git push?

No matter what I do, I can't seem to clear the warnings given by git status:

I've tried the helpfully suggested lines it mentions:

    git reset HEAD import.arc
    git reset HEAD lib/import.arc
    git rm import.arc
    git add lib/import.arc
and git push at various times, and I can't seem to get it to stop warning me about things I need to do, and no matter how many times I git push, nothing seems to change on the web summary. Is there some equivalent of the basic 'svn commit -m "comment" ' that does the trick?


8 points by nex3 4769 days ago | link

Git makes a distinction between your local repository and remote repositories. You have to commit your change to your local repo before you can push it to the remote one. So first you "git commit," then you "git push."

The total workflow goes something like this:

  git clone git://nex-3.com/arc-wiki.git
  emacs lib/import.arc   # Make your edits
  git add lib/import.arc # Schedule lib/import.arc for committing
  git commit             # Commit lib/import.arc to your local repo
  git push               # Push your local changes to the remote repo
The "git add" step is due to a little idiosyncrasy of Git where "commit" doesn't commit any changes you don't explicitly tell it to via "git add." You can also do "git commit -a" to automatically add all changes before you commit.

Also, "git commit" takes the same -m parameter that "svn commit" does.

Finally, the GNU Smalltalk folks have a good intro to Git: http://smalltalk.gnu.org/blog/bonzinip/using-git-without-fee....

-----

1 point by randallsquared 4769 days ago | link

Thank you; that was exactly what I needed. :)

-----

1 point by treeform 4748 days ago | link

i hope pg commits to it too

-----