Welcome to CNTK on GitHub!

Coordinator
Jan 25, 2016 at 4:00 PM
Dear contributors,

CNTK has moved to GitHub. This post provides an essential information for this change.

From this point on we STOP updating CNTK on Codeplex, nor will the CNTK forums on Codeplex be monitored. Please, use GitHub for all activities. The existing CNTK code here on Codeplex is now marked as read-only for those needing past versions.

GENERAL INFORMATION

New official web site address:
http://www.cntk.ai/

Repository address:
https://github.com/Microsoft/CNTK

Wiki address:
https://github.com/Microsoft/CNTK/wiki

1bit-SGD repository
1bit-SGD is now located in a separate repository.
See https://github.com/Microsoft/CNTK/wiki/Enabling-1bit-SGD
Windows Users: Note that recursive Git operations are currently NOT supported from within Visual Studio

CODING GUIDELINES AND GITHUB PULL REQUESTS

If you would like to contribute to the project or simply change something locally and ensure you can still build CNTK, please read our Development Guidelines at https://github.com/Microsoft/CNTK/wiki/Developing-and-Testing

To make a contribution to CNTK, please use GitHub Pull Request procedure as described at https://help.github.com/articles/using-pull-requests/
Note that during your first contribution you will be asked to agree to the terms of Microsoft Contribution License Agreement (CLA). This will happen only once. It is also valid for all people who already made contributions here in CodePlex. This is due to the fact that we also change the License for CNTK. We apologize for all possible inconvenience.

The rest of the post is for people who had work in a branch on the old CNTK Codeplex repository, which they would like to update with respect to the latest GitHub master branch. All others may skip.

REBASE AND MERGE OF AN OLD BRANCH TO GITHUB MASTER

Please note that in general we have migrated branches from Codeplex to Github, but because of the changes we made while moving to GitHub (separating 1bit-SGD, updates in coding standard and updates in Copyright headers) the first merge or rebase of your branch may be tricky. Below are some recommendations.

Let's assume your feature work is in the branch "user/feature1".

Option 1. Rebase onto master
git fetch
git checkout user/feature1

# We recommend that you squash your work into a single commit before rebasing
# (See http://www.git-scm.com/book/en/v2/Git-Tools-Rewriting-History or
# http://makandracards.com/makandra/527-squash-several-git-commits-into-a-single-commit on squashing)

git rebase -X ignore-space-change origin/master

# Go through rebase process / conflict resolution
# Also, inspect your resulting branch (e.g., using gitk) and see that you don't break new indentation or formatting.
# Consider using clang-format on files that you have modified.
Important! If you encounter an error "Unknown exit code (128) from command: git-merge-recursive … or error: addinfo_cache failed for path … while rebasing, please do not proceed with your rebase without making a backup copy of your local repository. This can lead to losing some of your changes, and seems to be related to a bug in Git. We believe this situation is avoided by squashing your branch first, before rebasing (see above).

Option 2. Merge with master ("forward integrate")
# Like above, -X ignore-space-change can help with reducing the number of conflicts you see.
# Notably, however, the "ignore-space-change" options has an implicit direction, i.e., the merge operation is not symmetric, as it is with default settings.
# So, we set up a temporary branch to do the merge so that indentation / spacing on master is preferred over indentation on your feature branch.

git fetch
git checkout -b tmp origin/master
git merge -X ignore-space-change user/feature1

# Go through conflict resolution.
# Also, inspect your resulting branch (e.g., using gitk) and see that you don't break new indentation or formatting.
# Consider using clang-format on files that you have modified (note: instructions will be put into the CNTK Wiki)
# Then, update the original branch, and delete the temporary branch (do not push it):

git checkout user/feature1
git merge --ff-only tmp
git branch -d tmp
Comments
If you see a conflict / modified file with conflict markers in the file, this is due to configuration for newline normalization, which has been added to the master branch (via the .gitattributes file in root). Simply git add the file that is shown as modified.

Any warning of the type warning: unable to rmdir Source/1BitSGD: Directory not empty you can normally ignore. This is due to the new git submodule for 1BitSGD, which doesn't get fully removed when you switch branches.

As you can see above, providing an option to the default merge strategy is recommended. -X ignore-space-change, as shown above, has worked best, but has the potential to mess up code formatting. Please carefully inspect your merge/rebase results.

Please be extra careful when you do the first merge or rebase for one of your branches for the first time. Please follow the new indentation. Do not use tabs.



And sincerely Thank you!
Your CNTK team.