-
$ git clone <link> # copy git repository
- To get the link, visit the repository (ex. 'Clone or download' in Github)
-
$ touch <file> # make new file
-
$ git log # check the whole log
-
$ git log --oneline # check only the main logs
-
$ git log -1 # check only the last log
-
-
$ git diff # check the differences made in git
-
$ cat <file> # print the file on the monitor
-
$ git push origin master # push the master to origin
-
$ git pull origin master # pull the origin to master
-
$ git status # ★ check the status of git (it should be 'working tree clean')
-
$ git pull origin master # pull the changes from Github $ git log --oneline # check the log to compare with Github commits
-
Various changes in local folder
-
Various changes in local folder
-
$ git status # ★ check the status of git
-
$ git add <file> # stage the file for committing $ git commit -m "<Commit message>" # commit the file to git
-
$ git push origin master # push the changes to Github $ git log --oneline # check the log to compare with Github commits