Wednesday, 17 September 2014

Github: Steps to solve merge conflict from terminal

Syncing a fork

 When you synchronize your fork with upstream(i.e original developer branch)
 sometime you got merge conflict.  
git fetch upstream
git checkout master
git merge upstream/master 
If you got merge conflict. Follow the next steps to solve merge conflict 
and keep your fork updated.
 1) grep -lr '<<<<<<<' .\
 2) git checkout --ours Path/File

    git checkout --theirs Path/File
 3) git commit -am "fix conflict"
 4) git pull --repo= <URL>

Github: Working on opensource project, Make Pull request

GitHub is a GIt repository web-based hosting service which offers all of the distributed revision control and source code management (SCM) functionality of Git as well as adding own features.
 It also provides access control and several collaboration features such as wikis, task management, and bug tracking and feature requests for every project.
Here are few steps to work on an open source project
1. Fork repository- Fork existing repository into your

2. Clone repository locally - 
 git clone <repo URL>

3. Make code changes locally:

4. Commit changes locally -
 git commit -a

5. Push changes to hosted repository -
 git push --repo=<URL>

6. Create a Pull request for original repository

Saturday, 6 September 2014

SQL clauses with Order of Execution

SELECT- which you use to specify the fields or calculated fields you want to return.
FROM- which you use to specify table or tables you want to use and usually includes joins.
WHERE- which you use to filter rows
GROUP BY- used to grouped together values using fields or expression you specified
HAVING- filters group by results with aggregate function (doesn't work on row by row basis like WHERE)
ORDER BY- used to specify result order