Skip to content

Instantly share code, notes, and snippets.

@mikestratton
Last active August 29, 2015 14:23
Show Gist options
  • Save mikestratton/c23d0cb6e5ea9775318f to your computer and use it in GitHub Desktop.
Save mikestratton/c23d0cb6e5ea9775318f to your computer and use it in GitHub Desktop.
Simple Git Command Instructions
Simple instructions to clone, push and pull Git content:
server <<<--->>> local system
To clone repository from Github to local system:
1. Open Git Bash
2. git clone <URL of Repository>
To add file or subdirectory to local Git (Record changes to repository)
1. Open Git Bash
2. cd <directory>
3. git commit -m "committed message"
Stage changes to ALL files & folder prepare for push
1. git add -A
// if the "git add -A" command does not seem to work
// try:
1.a git add .; git add -u
1.b git add -A .
1.c git add -u
To Push Changes to Remote Server
1. Open Git Bash
2. cd <directory>
3. git init
4. git push
5. enter user name in Git Bash
6. enter password in Git Bash
***********************************************************************************
***********************************************************************************
Listing of key Git commands
git init
Create an empty Git repository or reinitialize an existing one
git clone
Clone a repository into a new directory.
git add *
-or-
git add filename.txt
Add file contents to the index.
git commit
Record changes to the repository.
git commit -m "committed message"
Record changes to the repository with a message attached to the commit.
git push
Update remote refs along with associated objects.
git pull
Fetch from and integrate with another repository or a local branch.
git log
Show commit logs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment