Showing posts with label github. Show all posts
Showing posts with label github. Show all posts

Wednesday, November 21, 2018

Selecting multiple lines of code in Github file

To select a single line of code, we can just click on the line number to highlight the line. That provides the url with a single line code selection.

Example:
https://github.com/aptana/studio3/blob/development/bundles/com.aptana.console/plugin.xml#L5

To select multiple lines of code, click the number of the first line in the range to highlight the line of code. Then, hover over the last line of the code range, press Shift, and click the line number to highlight the range.

Example:
https://github.com/aptana/studio3/blob/development/bundles/com.aptana.console/plugin.xml#L5-L11

Thursday, September 15, 2016

How to get your colleague Pull request into your system for testing

For my own reference:

Example:
git remote add coworker https://github.com/coworker/titanium_studio.git
git fetch coworker
git checkout --track coworker/TIMOB-23628

If your co-worker has made some more changes, then you pull the latest changes in the below way.

git checkout TIMOB-23628

git pull


To push it back to your colleague branch
git puh coworker TIMOB-23628




Another way would be

To fetch a remote PR into your local repo,
git fetch origin pull/ID/head:BRANCHNAME

where ID is the pull request id and BRANCHNAME is the name of the new branch that you want to create. Once you have created the branch, then simply

git checkout BRANCHNAME
Reference: https://stackoverflow.com/questions/27567846/how-can-i-check-out-a-github-pull-request-with-git