Simple Sequence of GIT Commands

前端 未结 3 1955
误落风尘
误落风尘 2020-12-17 01:39

I read the documentation and googled a good bit, but there is no real simple steps to be able to commit your local changes to github. I compiled the following steps and I ju

3条回答
  •  无人及你
    2020-12-17 02:23

    I think that that's enough for very basic usage. I'd just like to add two comments:

    • It's always a good thing to check what you're adding to the staging area (which is what you're doing with git add): either use git diff, or do a git add --patch, which will start an interactive procedure to let you decide whether to accept or reject each hunk of code you modified. If you messed anything up during this phase, you can always git reset HEAD to get the changes back to the working copy (i.e., you would simply undo the add)
    • You might want to do steps 2 and 3 together by issuing a git commit -a -m 'your message'.

提交回复
热议问题