git Software Version Control

By | February 10, 2016

Git command reference

Step 1 – Initialize git (terminal)

$ git config –global user.name  ‘Your Name Comes Here’

$ git config –global user.email ‘you@yourdomain.example.com’

$ git init

Step 2 – Open a new repository (browser)
Create_a_New_Repository

broimp_new_repository__Using_github_to_create_a_new_software_repository

Step 3 – Create git repository (terminal)

homework $ pwd                 Confirm location of repository parent dir

homework $ git clone git@github.com:broimp/new_repository.git 

                               Pasted clone string from browser

homework $ ls                  check creation of “new_repository” dir

homework $ cd new_repository   Move into new repository

new_repository $ ls            Confirm repository content has default file

new_repository $ git show      Displays relevant details for repository

new_repository $ mine .        Invokes RubyMines editor for repo directory

Step 4 – Modify the default README file so git has something to process (RM app)

README_md_-_new_repository_-____workspace_davinci_coders_t1_2016_homework_new_repository_

Step 5 – Apply changes and publish (terminal)

new_repository $ git status            “modified:   README.md”

new_repository $ git diff              Shows old/new line comparisons

new_repository $ git add README.md     Registers file “snapshot” with git

                                       Can be done multiple times before

                                       commit

new_repository $ git commit -m “this is what a commit looks like”

                                       Apply changes to local repository

new_repository $ git status            “Your branch is ahead…by 1 commit”

new_repository $ git push              Release change to public server

new_repository $ git status            “Your branch is up-to-date…”

new_repository $ git log -p            Displays each git transaction

Step 6 – Confirm change in Github (browser)

broimp_new_repository__Using_github_to_create_a_new_software_repository

Leave a Reply

Your email address will not be published. Required fields are marked *