Difference between revisions of "Github"

From rbachwiki
Jump to navigation Jump to search
Line 17: Line 17:
  git add .
  git add .
  git status // will give you the status
  git status // will give you the status
=== Committing Files ===
This saves the state of the files at a specific time
get commit -m "whatever you want to say"
=== Edit Global File ===
git config --global --edit
vi commands
i
:wq
After doing this, you may fix the identity used for this commit with:
    git commit --amend --reset-author
=== Other git Commands ===
git log
git checkout about.html// this will revert the previous version in staging or if you delete a file it will bring it back
if you want to commit the deleted file to staging
git add about.html

Revision as of 23:20, 9 August 2016

Install Git on A Mac

http://git-scm.com Download and Install, then go to terminal and type

git --version

Install Git on Windows

Same as mac, but you have to use the git terminal

Getting Started with a Git Project

  • Identify a folder project
    • CD into Project Directory
  • In the git Terminal enter
git init

Add files to the Staging Environment

git add .
git status // will give you the status

Committing Files

This saves the state of the files at a specific time

get commit -m "whatever you want to say"

Edit Global File

git config --global --edit
vi commands
i
:wq

After doing this, you may fix the identity used for this commit with:

   git commit --amend --reset-author

Other git Commands

git log
git checkout about.html// this will revert the previous version in staging or if you delete a file it will bring it back
if you want to commit the deleted file to staging
git add about.html