Wednesday, 25 February 2015


Peer code reviews will help a lot during coding stage to ensure the correctness of the code.

We know that doing smaller commits will minimize the bugs.

Combining the above two will really help to have a better code.

Following can be a tip to do a peer code review if you use Git.

  1. Developer does a rebase and do a smaller commit.
  2. Developer creates patch with git format-patch -1 (sha of commit)
  3. Developer emails the patch with rebase line info !!!
  4. Reviewer rebase to the same line
  5. Reviewer applies the patch
  6. Reviewer uses git difftool to review and mentions that as comment in the code area with //TODO
  7. Reviewer creates patch and sends as mail to the developer.

  
If you dont have any other review system, this may help.

Tuesday, 24 February 2015



Given two different SHAs (Commit Ids), you might want to view the difference between them and compare.

You can do this by

git difftool

The above will launch the difftool for each file in sha1 and sha2.

If you want to view only the file names,

git diff --name-only

Reference: StackOverflow




You many want to create a new local branch and track the remote branch.

You can do this by

git branch --track  

Where is the complete path of remote branch including remotes/origin/...


Thursday, 5 February 2015



Thumb rule to use Threads in the code

Gallery

Object Oritented, Git

Most Commented

OOAD

Contact Form

Name

Email *

Message *

2014 © Planer - Responsive Blogger Magazine Theme
Planer theme by Way2themes