Changes between Version 1 and Version 2 of WorkingWithGit


Ignore:
Timestamp:
Aug 20, 2016, 2:09:39 AM (8 years ago)
Author:
markemer (Mark Anderson)
Comment:

First shot at some info about git.

Legend:

Unmodified
Added
Removed
Modified
  • WorkingWithGit

    v1 v2  
    11This page should contain information about how to work with [https://git-scm.com git], specifically from the point of view of someone familiar with [https://subversion.apache.org Subversion].
     2
     3To start:
     4{{{
     5svn checkout https://svn.macports.org/repository/macports
     6}}}
     7becomes
     8{{{
     9git clone git@github.com:macports/macports.git
     10}}}
     11When you clone you will have the entire repository. After you make a change, you can run {{{ git status }}}
     12and get something like this.
     13{{{
     14On branch master
     15Your branch is up-to-date with 'origin/master'.
     16Changes not staged for commit:
     17  (use "git add <file>..." to update what will be committed)
     18  (use "git checkout -- <file>..." to discard changes in working directory)
     19
     20        modified:   aqua/iTerm2/Portfile
     21
     22no changes added to commit (use "git add" and/or "git commit -a")
     23}}}
     24What this tells me, is that I've changed a Portfile, but not done anything.
     25After that, you can add the files that you want to add to your commit using {{{git add aqua/iTerm2/Portfile}}}.
     26Now, {{{git status}}} will look like:
     27{{{
     28On branch master
     29Your branch is up-to-date with 'origin/master'.
     30Changes to be committed:
     31  (use "git reset HEAD <file>..." to unstage)
     32
     33        modified:   aqua/iTerm2/Portfile
     34}}}
     35Then run {{{git commit}}} and everything is set. On your machine. To push to github you then have to run {{{git push}}}.