Skip to content

Latest commit

 

History

History
84 lines (65 loc) · 1.29 KB

08-git-setup.md

File metadata and controls

84 lines (65 loc) · 1.29 KB

Setup Git

Is a Open Source Version Control System.
https://git-scm.com/

git --version
git config --global user.name "Your Name"
git config --global user.email "[email protected]"

nano ~/.gitconfig
#.gitconfig
[user]
  name   = Your Name
  email  = [email protected]
[github]
  user   = username
[alias]
  a      = add
  s      = status
  r      = reset
  cm     = commit -m
  cam    = commit -am
  uns    = rm --cached
  cob    = checkout -b
  co     = checkout

List git global config

git config --global -l

press q to exit

Setup a Git Project

mkdir macdevgit
cd macdevgit

touch readme.md
git init
git add .
git commit -m "Initial Commit"
git remote add origin [email protected]:[user]/[project].git
git push origin master

List Branches

git branch --all

Remove remote Git

git remote rm origin

note: origin is the name of the remote

Clone Project

git clone [email protected]:[user]/[project].git

Table of Content