Git
Git
$ git diff #shows difference between local and remote with colours
$ git checkout -- <file> #to discard changes in working directory
Turn an existing remote folder in a git repository
$ touch README.md
$ git init
$ git add README.md
$ git commit -m "first commit"
$ git remote add origin https://gitlab.com/negi2003/<reponame>.git
$ git push -u origin master
HTML
right mouse click + inspect to see html code of website
Git Theory
-
Git is a software for version control that determines an ID for all files.
-
GitLab and GitHub are web based managing systems that can link remote repositories too
-
Git has a local repository and a remote repository. It is possible to have multiple identical local / remote repositories.
-
Multiple people can work on their local repository and push to the same remote.
-
git commit writes into the local repository
-
git push pushes the committed into remote