Changes between Version 13 and Version 14 of u/erica/GitRepos


Ignore:
Timestamp:
05/15/15 15:07:21 (10 years ago)
Author:
Erica Kaminski
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • u/erica/GitRepos

    v13 v14  
    3232Now shows you have 2 local checked out versions of the code, master and development, and that you are currently sitting in the development branch (marked by an '*').
    3333
    34 From there, if you want to begin making changes to the code, you must ''create'' a new branch off of the development branch, for which you will later merge with the development branch after you have tested your edits.
     34From there, if you want to begin making changes to the code, you must ''create'' a new branch off of the development branch, for which you will later merge (see below) with the development branch after your edits have been tested.
    3535
    3636{{{
     
    4040This will take the current version of the development code and create an offshoot of it (i.e. a copy of it) for you to then work with.
    4141
    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,
     42This 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,
    4343
    4444{{{
     
    5252git branch -a
    5353}}}
     54
     55After that initial push, one only needs to do a simple
     56
     57{{{
     58git push
     59}}}
     60
     61to 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
     63Now, 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{{{
     66git status
     67}}}
     68
     69This 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{{{
     72git status -uno
     73}}}
     74
     75This 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{{{
     78git diff filename prev_revision
     79}}}
     80
    5481
    5582Note, as you go on to make changes to this branch, they will be local until you commit and push those changes back into the central repo. (cf. [https://astrobear.pas.rochester.edu/trac/wiki/DevelopmentProcedure here] for details).