42 | | This new branch is only a local copy, meaning that if you were to delete your directory, your branch (and all of its changes) would cease to exist (i.e. no copy of it is yet present in the central repo), and that no one else can see it. Instead, you want to push (i.e. copy) this branch into the central repo, |
| 42 | This new branch is only a local copy, meaning that if you were to delete your directory, your branch (and all of its changes) would cease to exist (i.e. no copy of it is yet present in the central repo), and that no one else can see it. So, in order to sync your local copy with the main repo, you want to push (i.e. copy) this branch into the central repo, |
| 54 | |
| 55 | After that initial push, one only needs to do a simple |
| 56 | |
| 57 | {{{ |
| 58 | git push |
| 59 | }}} |
| 60 | |
| 61 | to update the central repo with new edits. Before that however, one should "add" and "commit" changes to their local copies, or else nothing new will be available to be pushed. |
| 62 | |
| 63 | Now, what does "add" mean anyway -- it means "staging" changes to be committed, i.e., making them available to be committed. After one has edited some files in their branch, they can give the command, |
| 64 | |
| 65 | {{{ |
| 66 | git status |
| 67 | }}} |
| 68 | |
| 69 | This shows ALL of the uncommitted edits of your branch. It reports a ton of uninteresting files after you compile -- object (.o) files and the like that are never going to be committed to the central repo and are therefore named 'untracked' files. To get rid of these uninteresting files, use the option -uno, |
| 70 | |
| 71 | {{{ |
| 72 | git status -uno |
| 73 | }}} |
| 74 | |
| 75 | This will now report a list of changes you made since the last commit. If you want to diff the version of any of these files with previous commit's versions, you would use the command |
| 76 | |
| 77 | {{{ |
| 78 | git diff filename prev_revision |
| 79 | }}} |
| 80 | |