Git Commands

mkdir invention
cd invention
git init
touch newton.txt
touch a.txt
git add newton.txt
git add a.txt
git rm -f a.txt
git commit -m “first commit”
git remote add red https://github.com/amisha2016/invention
git remote
git remote -v
git status
git stash
git status
git stash list
git stash apply
git push -u red master
git log
git stash
git revert HEAD~1
ls
git log
git reset –hard HEAD~1
ls
git log
git pull
git checkout -b v1
git checkout -b v2
git checkout v2
git branch (tell all branches in repo)
git branch -m master(rename current branch to master)
git branch -D v2
git merge v1
git diff

git clone https://github.com/amisha2016/fresh

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s