Recent Changes - Search:

Basics

Languages

Tools

OS

Resources

PmWiki

pmwiki.org

edit SideBar

Git /

Commits

So, you have configure your repo, modified some code, and you are now committed to them, ready to enter them in the repo for posterity.

First off, check the status of your repo using:

git status

This will list the files which have been changed since you setup your repo. This is a handy way to consider what you have touched on. Next, if you want to see the difference in details:

git diff

will list all the difference between the current version of the files and the latest committed ones. Assuming you are happy with how things are (if not, just continue editing the files), the next step is to add the files you want to commit to the repo, using:

git add File1 File2

where File1, File2 are the files you want to commit. This is not an all at once process, so you can add files one at a time or a bunch at a time. At any point when adding files, you can check the status (git status) of your repo and you will see an additional listing of the files which are in your staging area. These files are the ones for which changes will be committed. Once you are ready to proceed:

git commit

will save these changes in the repo, after opening your favourite editor for you to type a message that described what this commit has done to the code. For short messages, it is handy to use the -m option, followed by the message between quotes ("").

Once this is done, you should be able to see a new entry in the log of your repo.

Edit - History - Print - Recent Changes - Search
Page last modified on January 18, 2018, at 04:40 PM