Skip to content

Instantly share code, notes, and snippets.

@danish-rehman
Last active August 29, 2015 14:13
Show Gist options
  • Save danish-rehman/d9d3fb078121e2d77e0b to your computer and use it in GitHub Desktop.
Save danish-rehman/d9d3fb078121e2d77e0b to your computer and use it in GitHub Desktop.
Git command
#Diff with master
>> git diff master — filename
# Checkout submodule
>> git submodule update
# Undo last commit
>> git reset —soft HEAD~1
# Add remote repo
>> git remote add new_gitlab [email protected]:adserv/rtbdsvc.git
#
>> git remote -v
>> git push new_gitlab master
>> git pull
>> git merge origin master
git checkout master
git pull # Get your master up to date with origin/master
git checkout <your-branch>
git merge master # Get your branch up to date with master (and origin/master)
git checkout master
git merge <your-branch> # Merge to master
git diff origin master/master # Verify your changes are intact
git push origin master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment