< BACK TO ARTICLES

Setting Up and Using GIT from the Command Line

2/13/17

Git Tutorial

install git:

sudo apt-get update

sudo apt-get install git

add git user info:

git config --global user.name "NAME"

git config --global user.email EMAIL

clone branch:

git clone GITBRANCH(ex: https://github.com/jarreed0/ArchGE.git)

update git branch:

git pull

update files that you have changed:

git add UPDATEDFILES

comment on updated files:

git commit -m "COMMENT"

push updated file to branch:

git config --global push.defualt simple

git push

compare your branch with main:

git status

creating a git branch:

git init

undo last push:

git reset --hard HEAD@{1}

git push -f

git reset --hard HEAD@{1}

change origin:

git remote add ORIGINLOCATION.git

and when you are ready to update it after adding files and commiting, git push -u origin master

#git