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

Saturday, November 23, 2013

How to merge github wiki changes from one repository to another


Case:
User forked a repository on GitHub and wiki pages are also forked, user do changes to wiki, but there is no way to send pull request for wiki changes, but Wiki is just another sub repository in GitHub repo, so admin of original repository have to do merge manually.

Example:
source wiki: https://github.com/VadimPanasiuk/sevntu.checkstyle.wiki.git
target/original wiki: https://github.com/sevntu-checkstyle/sevntu.checkstyle.wiki.git

Source of wisdom for massive squash.

Commands:
git clone https://github.com/sevntu-checkstyle/sevntu.checkstyle.wiki.git
cd sevntu.checkstyle.wiki.git
git fetch https://github.com/VadimPanasiuk/sevntu.checkstyle.wiki.git master:master-Vadim
git checkout master-Vadim

#checkout to last non-Vadim's commit  
git reset --hard 34a2f8e627dd6209f4928b6f66a37368789ab492

# do massive squash of all Vadim's changes
git merge --squash HEAD@{1}          
git commit -m "How to use SevNTU Checkstyle in Intellij IDEA (markdown)"
git checkout master

# cherry-pick newly squashed  commit
git cherry-pick cbe1915a65d80769d56f4fbd9a60dd0b88c8c049    

git push


If wiki was forked from latest state of original wiki, you can do it a bit simpler:
git clone https://github.com/sevntu-checkstyle/sevntu.checkstyle.wiki.git
cd sevntu.checkstyle.wiki.git
git pull https://github.com/VadimPanasiuk/sevntu.checkstyle.wiki.git master
# squashing all Vadim's changes in one 
git push origin master

Thursday, September 12, 2013

Github need to have search of files feature in repo

I will be lovely if Github create search in repo at least by file name (with support of matching by Camel case), it will be very useful during sources investigation. Developers always search for files, and gihub is not just a web hosting - it is online editor, and allow contribution to project without clone to local PC.

This feature exists - https://github.com/blog/793-introducing-the-file-finder just press "t" and search appear.

Sunday, November 11, 2012

SevNTU Checkstyle version 1.6

We finished new version of our extension for Checkstyle - release 1.6.
I updated wiki pages to allow other developers easily join the project.
Read our publications, in Russian language, latest is for 1.5.3 release, for 1.6 will be soon.

Release 1.6.0 (21/October/2012):

LogicConditionNeedOptimizationCheck -  This check prevents the placement of local variables and fields after calling methods in '&&' and '||' conditions. Done by Ilja Dubinin.
Example:
"if (isVisible() && active)" == should be refactored to ==> "if (active && isVisible())"
Reason: swap of conditions expressions will be beneficial, but some time you can find logic that in isVisible() change 'active' variable value and this optimization will not be correct - but this is sign of bad  design!

ForbidCCommentsInMetods -  Check prevents usage of C-style (/* ... */) comments inside method body. If you have class declaration inside method body with JavaDoc you will get error too, that is sad side effect for now, but I did not met such cases for now, so I thunk it will be incentive to move class out. Done by Ilja Dubinin.
Reason: C-style of comments are problem for future investigation, it should be treated as DEBUG/temporal comments, but should be cleared finally.

InterfaceTypeParameterNameCheck -  Checks that interface type parameter(for template) names conform to a format specified by the format property. Default format is ^[A-Z]$. Done by Dmitry Gridyushko.
Reason: to avoid template types to be like <INPUT>, <CUSTOM>, <LISTENER> and force developer to name them by 1 letter <I>, <C>, <L>. to clearly indicate nature of variable in code down the file.

All details are here: http://sevntu-checkstyle.github.com/sevntu.checkstyle/
We will do bug fixing in 1.6.1 and 1.6.2 as always, please test and report bug ...... .