Table of Contents | ||
---|---|---|
|
When using Git and GitLab to develop and check-in changes to the RAS codebase, follow this process.
...
GitLab will merge the branch into the master branch and report on the results. Usually merges will succeed without any further action necessary, but if merge conflicts are reported they'll need to be manually resolved. (Details TBD)
Rejecting a merge request
...
Once your branch is merged into master, you probably don't need it anymore. Leaving these branches as-is shouldn't hurt anything, but if you'd like to clean them up, you can use the command 'git branch' to print all of the branches that exist in the current repo, and 'git branch -d branch_name' to delete a branch.
Updating ras-kuali repos
When we want to upgrade to a new Kuali release, we need to update our ras-kuali repos to the latest Kuali revision and then select the appropriate release tags for the new build. Run the following commands in each of the ras-kuali repos:
Create a new branch off of 'master' for merging in the updates
Replace 'kc-1606' with the version of the new release; this will be the branch name used in the merge.
Code Block | ||
---|---|---|
| ||
git checkout master
git checkout -b kc-1606 |
Add the Kuali github as a remote source, if necessary
Run the git remote command to view the remote repositories linked to this repo.
Code Block | ||
---|---|---|
| ||
git remote -v |
If the output of this command shows the Kuali github addresses as a remote repo in addition to the GitLab addresses, you can skip to the 'git fetch' step below. Otherwise, you'll need to add the github repo as a remote source, replacing the URL here with the correct github address for the matching repo:
Code Block | ||
---|---|---|
| ||
git remote add github https://github.com/kuali/kc-s2sgen |
Fetch the new commits from Github
Once the github address has been set up as a remote repo, you are ready to fetch the changes from github to your local repository:
Code Block | ||
---|---|---|
| ||
git fetch github |
This will pull all new commits, branches, and tags that have been added to the github repo since your last fetch into your local repo.
Merge the Github changes into the local branch
Run the merge command to merge the contents of the Github 'master' branch into the current local branch.
Code Block | ||
---|---|---|
| ||
git merge github/master |
Push the new changes to GitLab
Run the following commands to push the new changes and tags to the GitLab server. New tags are not pushed by default, so the second command is necessary to sync those to the server.
Code Block | ||
---|---|---|
| ||
git push origin kc-1606
git push origin --tags |
Merge the changes within GitLab
Create a merge request on GitLab as described above, and merge the new branch into the master branch. The repo has now been synced with the Kuali Github repo, and the changes can be pulled down to your local repo using the 'git pull' command.
The repo will be at the latest commit by default, so you may need to checkout a specific release tag in order to build a specific version of the project.