- cd to your local directory
- git init : Initialised git
- ls -a : to view all the hidden files
- git status : to check what files are inside the staging area
- git add [filename.txt] : add files to the staging area
- git rm —cached -r : to remove everything from the staging area
- git status: to check what files are inside the staging area
- git commit -m “initial files” : commit files in the version control
- git log : see what commit has been made
[If there is edits made to the files]
- cd to your local directory
- git status : to check what files are inside the staging area
- git add . : add all files to the staging area
- git status : to check what files are inside the staging area
- git commit -m “initial files” : commit files in the version control
- git log : see what commit has been made
- git diff [filename] : see what difference between current version and last save point
- git checkout [filename]:rollback to the previous versiong
[Compare the codes of your files in your working directory]
- cd to your directory you have committed
- git add . : git add all files
- git diff . : check the difference between current version and last save point
No comments:
Post a Comment