how to use git (basic)
===
- 1. **git --version **
can also use **git -v**
this can check your git version
- 2. mkdir "folder.name"
create a folder
- 3. cd "folder.name"
go inside the folder
- 3.1 vi index.html
create an html file inside
<html>
nothing
</html>
- 3.2 git status
this can check the status of repository
- 4. git init
initial the repository
- 5.git config --global user.name "Your_Name"
setting your user name
- 6.git config --global user.email "Put_your_email_here"
setting your email
- 7. git status
check the file status and the file in local stagin will show in red letters
- 8. git add **index.html**
use ****git add .**** will add all staging file inside become a working mode (wait for upload) or you want to pick up only one file can subsitute the **.** to the **file name**
- 9. git status
check again the file , if the colore is green it means it have become working mode. and working for push
- 10. git commit -m "First initial commit"
the message explain why you push this file.
Sometimes you push latest version and the old version will be edit , this message can make other people know why you need to do this change.
- 11. **Go to git hub and create new repository**
If you don't pay you can't use private.
- 12. **copy the https url on your github.**
- 13. **go back git**
- 14. git remote
- 15. git remote add origin **"Your_url"**
- 16. git remote -v
check if this already there
- 17. git branch
check your branch is the same with the branch on github
- 18. git push origin **master**
depend which branch you are
###
local staging
local work
remote storage