Skip to content

antonbarua/git-reference

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 

Repository files navigation

Git Reference

1. Initialize a local repository

git init

mkdir git-reference
cd git-reference/
git init

2. Check the status of the repository

git status

git status

3. Add files to be committed

git add < filename >

git add README.md

4. Commit the changes to the staging area

git commit -m "< message >"

git commit -m "first commit"

5. Create a branch

git branch < branchname >

git checkout -b < branchname >

git branch edit
git checkout -b edit

6. Show branches

git branch

git branch

7. Connect with a remote repository

git remote add origin < remote_repo >

git remote add origin git@github.com:antonbarua/git-reference.git

8. Push a branch

git push origin < branchname >

git push origin master
git push -u origin master //track changes

9. Pull changes from a repo

git pull origin < branchname >

git pull origin master
pit pull //argument-less git pull, uses current branch and origin

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published