Contrast among Git and Github?
'Git':- 'Git' is a form control device
'Github':- Somewhat 'Github' is an online web facilitating web administration
Download
Download git from Git
git config
designing client data utilized in every nearby store
'git config - - worldwide user.name[firstname lastname]'
git init
'git init' is utilized to instate the git in our task it creates an envelope with the name '.git' which stores all the data about the git stage and commits
git remote
'git remote - v' is utilized to get remote access for the 'Github' store
git status
'git status' is utilized to check the situation with our task, it assists us with following the stage/unstaged record/envelope in the venture
git add
'git add filename' is utilized to add a specific record to stage and afterward to commit it in our 'Github' vault
another way
'git add .' is utilized to add every one of the unstaged records to the stage so we can commit them at the same time
git commit
'is utilized to commit every one of the arranged records and envelopes'
another way
'git commit - am "message"' is utilized to arrange and commit in single order
git log
'git log' is utilized to check every one of the logs meaning it assists us with following all the commits by showing the historical backdrop of the commit done in the task, it shows subtleties like commit hash(SHA), time, date as well as the message with the commit
git rm - stored
'git rm - stored' is utilized to unstaged all the stage records and envelopes meaning it assists us with eliminating every one of the documents and organizers from the stage
another way
'git rm - stored filename' is utilized to eliminate a specific record from the stage
git branch
'git branch name' it is use to make another branch in our 'Github' store
git checkout
'git checkout branch name' it is utilizations to change/change starting with one branch then onto the next
git push
'git push - u beginning expert' is utilized to push the resolve to dominate branch
another way
'git push beginning branch name' is utilized to push from beginning to a banch
git blend
'git blend - am "message"' is utilized to converge from one branch to other branch for Example ( primary to dominate )
git reset
'git reset - hard beginning/ace' is utilized to reset to last push commit
git pull
'git pull' is utilized to pull the records and envelope from distant vault to nearby
how to return to the past commit?
Step 1:
Duplicate
Duplicate
Duplicate
git log
utilize the git log order to see all the commits and copy the hash(SHA) of the commit you need to return to.
click q to leave the window
Step 2:
git reset - - hard glue the hash(SHA) you need to return to
Step 3:
git push - f
utilize this order to push the return hash(SHA) so your GitHub store can get reset to that git commit