Table of contents
No headings in the article.
Git is the free and open source distributed version control system that's responsible for everything GitHub related that happens locally on your computer
Some IMP Git commands:
- • ls : show me the all list of files and folders inside the directory.
- • ls -a : show me the all hidden files inside the folder
- • mkdir : make directory : to create new folder in specified location.
- • cd : change directory : to go inside the folder & to change its location.
- • git init : to initialized a empty git repository to a specific folder.
- • git status : to see the status for what we make changes priviously.
- • git add . : add the changes in history for furthur view
- • git commit -m "message" : commit the changes that you made with any message
- • touch file name : to create new file (touch names.txt)
- • vi file name : to go inside any file and change what you want.
- • esc :wq = to get outside from vi editor
- • git log : to see the whole log i.e. All changes that you made.
- • git reset id of the commit (get from git log) : to unstage the changes you made priviously
- • cat names.txt(file name) : to see the content from the file
- • git stash : supposed you made some changes but dont want to add now , save & insert them into backstage
- • git stash pop : to see the changes to be commited
- • git stash clear : clear the commits
- • git remote add origin URL : initialize the origin branch with URL
- • git push origin master : push the changes you made to the main branch
- • BRANCH & MERGE
- • git branch : to see list of branches present at movement
- • git branch branchName : to create new branch
- • git checkout branchName : points to head of the branch
- • git push origin branchname : push the changes to your branch