pathberries / git-commands

Git commands

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pathberries

Git Commands

- Empty Repository Initialization

git init

- Configuring email

git config --global user.email "user@mail.com"

- Configuring name

git config --global user.name "userName"

- Adding URL to Repository

git remote add origin URL

- Cloning a Repository

git clone URL

or

git clone URL destinationFolderName

- List branches

git branch

- Creating a branch

git branch branchName

- Changing branch

git checkout destinationBranch

- Merging branch

git merge branchToMerge

- Checking status

git status

- Adding files that were modified

git add fileName

or

git add .

- Commiting files

git commit -m "message"

- Pull files (GitHub to Local)

git pull

- Push Files (local to GitHub)

git push -u origin master

or

git push

About

Git commands