Git Basics
Git
Two-layer :
- Remote
- Local
pull and push command used to communicate Local(Local server) and Remote( Staging Server)
origin is the Local Server
master and dev are Staging Server
git pull origin dev (data pull from dev to origin )
create branch by
git checkout -b dev (-b create new branch otherwise change branch dev)
Normal syntax
git add .
git commit -m “Changes in dev”
Get akhil dev’s stories in your inbox
Join Medium for free to get updates from this writer.
git pull origin dev // dev to origin
git push origin dev // push data to origin to dev
Merge data
git checkout master
git merge dev // Dev merges to master .then push to server
Temporary Store data
git stash //reset to last commit
git stash list // list all stashed data
git stash pop // Go to previous Stage
Reset Branch
git log // to get all commits
git checkout COMMIT_ID // COMMIT_ID =12312312312
Git Ignore
Git Ignore used to ignore files in repository






