Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Fetch changes from DSpace Main GitHub: You fetch (and later merge) changes that have occurred in the central DSpace GitHub Repository:
    • From NetBeans: Right-click on the "DSpace Parent Project" (root project) and then select: Git -> Remote -> Fetch. This will pop up a window that will allow you to easily select the "upstream" configured repository to fetch the latest changes from, and allow you to choose the "master" branch to apply them to. Once you click "Finish", a new "upstream/master" branch will be created locally with the latest changes to be merged.
    • Wiki Markup
      _From Command-line_ in your DSpace source directory (e.g. {{cd \[dspace-src\]}}): {{git fetch upstream}}
  2. Merge changes into your Local Git Repo: Remember, "fetching" changes just brings them into your local-machine's copy of the Git repository. You'll then need to merge those changes with yours and push the changes back to your personal public GitHub repository.
    • From NetBeans: Right-click on the "DSpace Parent Project" (root project) and then select: Git -> Merge Revision. This will pop up a window to let you select which "branch" to merge into your currently checked out code. If press "Select", you'll see a new branch called "upstream/master" under "Branches -> Remote". Selecting that branch will merge the latest code from "upstream/master" into whatever branch you currently are working with (e.g. "master").
    • From Command-line in that same directory: git merge upstream/master
  3. Quick Status of Local Git Repo: If you want to see what happened, you can look at the "Status" information:
    • From NetBeans: Right-click on the "DSpace Parent Project" (root project) and then select: Git -> Show History. Click the "Search" button (without entering any search info). It will bring back results that will show you where the HEAD pointer is (latest commit in your local machine's git repo) versus where the 'origin/master' is (latest commit in your personal GitHub repo).
    • From Command-line in that same directory: git status (will tell you how many "commits ahead" of 'origin/master' you now are)
  4. Push Merged Code up to your Personal GitHub Repo: Finally, assuming all went well, you can push your changes back up to GitHub into your public personal repository:
    • From NetBeans: Right-click on the "DSpace Parent Project" (root project) and then select: Git -> Remote -> Push. This will pop up a window that will allow you to select the "origin" repository (your personal fork in GitHub), and allow you to choose the "master" branch to push to.
    • From Command-line in that same directory: git push origin master

...