Search This Blog

Showing posts with label git. Show all posts
Showing posts with label git. Show all posts

31 March, 2016

git drop all local changes and commit and sync to remote server

There are times while working with git, you want to drop all your local changes and commit and sync the files to be same as the git server. The steps to follow are
1) fetch the latest history from the server
2) pointing your local master branch at it like this

git fetch origin
git reset --hard origin/master

if you want to do this for a branch, change the master with the branch name

10 October, 2013

useful git diff commands for developers


1) git diff with only file name and its status

git diff --name-status<commit_id> 

2) Showing differences introduced by a commit

git show <commit_id> 

3) Showing differences introduced by a commit with file name only, status of each file with commit message
git show --name-status <commit_id> 

4) Showing differences introduced by a commit with file name only, status of each file
git diff-tree  --name-status -r  <commit_id> 


tmux enabling mouse interaction

Add the below line to the ~/.tmux.conf setw -g mouse on save the file and exit from the tmux shell, you should be able to use your mouse to ...