Git Commands

Git is a collection of commands to edit, track and organize gromramming files. It’s particularily useful in version constroling and joint project. Instead of other tools such as Perforce that only keeps copies on cloud, git also have copy/copy management system in local hardware, in addition, copies are also stored and synchronized online with all progressing versions.

$ git config –global “My Name”
$ git config –global

cd to the folder to set git, then type
$ git init
then we got this output: Initialized empty Git repository in /home/user/Desktop/git_exercise/.git/

$ git status to check status

$ git add hello.tx (*.py all python files)
$ git add – A (add all files)

$ git commit -m “intial commit” (commited locally)

Now connect to remote warehouse/on cloudserver (it’s called origin)
$ git remote add origin

$git push origin master
(push to the cloud)

$ git clone

$ git pull
(pull from the cloud)


(to be continued)

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.