Page tree

Create Project and set the repository name in stash

  1. Go to and log in
  2. Create a project in Stash (e.g. MCS) or go to an existing project
  3. Inside MCS, create a repository

The name above is e.g. the server/library name as it exists in .git

The following snippet is explained in the steps under it:

Step 0

If the repository is empty, GIT does not allow creating any branches. In this case, it helps to create an empty .gitignore file and commit it. So:

  1. Check out the master branch (git checkout master)

  2. Add an empty .gitignore file inside the server directory

  3. Commit the empty .gitignore file to master

Now you have a first commit from which you can create branches.

Push the local branch to stash (using the command line)

Since the repository name was also laid down in stash, we can use the command line to push the branch to stash:
Go to the branch locally:

check status (if not up do date, need to commit before continuing):
git status
If the branch is up to date with the master, then add the branch to stash using
the path (shown in the last stash snapshot above):

then check if it worked:
git remote
If it all went fine usually it will add the stash folder under origin:
Then one should make sure to have the permission in stash to access the
stash project, in this case:
git push stash --all
The repository is now successfully cloned in stash.
Switch in NetBeans to the remote stash location
Note: The project example name is different from the one used in the previous
First create branch in NetBeans:
Right mouse to the project name ->Git->Branch/Tag->Create Branch…

the new branch name is e.g. CodeReview

Then switch to branch:
Right mouse on the project name ->Git->Branch/Tag->Switch To Branch…

After switching one can check back in the command line under the local
location. It will be observed that one has switched on the codeReview branch
(see below)

Then the changes that need to be reviewed are now pushed to the remote
branch for review:

Make sure, the correct path is used:

The newly created branch is now visible in stash.

Give the branch of review

Create Pull request

NOTE: The tool is not meant to review completely new files, but just changes
on already created files. The reviewer is allowed to type a comment +-10 lines
around the changed line. In case it is desired to review completely new file,
after having the master checked-in in stash, it is possible to move the files in
NetBeans in a new subdirectory (e.g. “src”) and then they will appear fully in
stash for review.

Review flow

The reviewer is notified per email and asked to do the software review.
He logs in the stash and can see the diff between master and the review
branch. The reviewer has the choice between two options - “needs work” or
In case of remarks, the reviewer writes a comment. He/she canʼt make changes
himself on the code.
When ready with all comments, he/she selects “needs work” and the
programmer is prompted to look at the comments.
The programmer makes changes in the code and commits these changes in Stash
(no new pull-request needed). 
The new code gets replaced automatically. 
After the comments have been worked through, either by changes in code or
rationalised away in discussions with the reviewer, the procedure is repeated
again and the reviewer is again informed to take a second look at the changes
made after his comments.
If the reviewer has no more comments on the code, he selects “merge” and the
stash branch is merged in the stash master branch.
At this point the “codeReview” branch get deleted.

  • No labels