Skip to content

HOWTO Commit Changes to CiteSeerX

Kyle Williams edited this page Jul 11, 2013 · 1 revision

If you're from the Penn State development team (or have write access to this repository) then this HOWTO is for you. If you're not from the PSU development team, then please fork this repository and request to have your changes integrated via a pull request.

The workflow that we use to commit changes to CiteSeerX is based on the workflow used at GitHub. It basically involves the following steps:

  1. Clone the repository/pull the latest changes
  2. Create a new branch for your changes
  3. Make your changes, committing and pushing to your own branch as necessary
  4. Once you're finished and want to integrate the changes, make a pull request on GitHub.
  5. Cleanup

This page briefly describes how to do this with commands for each step. If you're interested in finding out more about this workflow, please see the original blog post on it: http://scottchacon.com/2011/08/31/github-flow.html

Step 1: Clone the repository/pull the latest changes

If you don't have a local copy of the code yet, then you want to get it. Otherwise, if you do, you want to make sure you have the latest updates.

To get a copy of the code do:

git clone [email protected]:SeerLabs/CiteSeerX.git

To update your local copy of the code do:

git pull origin master (make sure you're on the master branch when pulling)

Step 2: Create your own branch

The master branch should always be in a production ready state. Thus, we do all development in separate branches and pull them into the master branch when ready. To create your own branch your first need to crate the branch and then do a checkout on it:

git branch mybranch (replacing "mybranch" with the name of your new branch - try to be descriptive, i.e. "new_ranking")

git checkout mybranch

Typing git branch should now show you as using "mybranch."

Step 3: Make your changes

You are now ready to make whatever changes you want on your branch. Add, commit and push to your own branch as often as you like, but don't push or commit anything to the master branch.

To add files do: git add file1 file2 [filen]

To commit do: git commit -m "Some details about this commit

To push do: git push origin mybranch

Step 4: Request to pull the changes into master branch

Once your happy with your changes and think they're ready for production, you can request to have them pulled into the master branch. To do this go to https://github.com/SeerLabs/CiteSeerX/ and click on the "pull requests" link and follow the instructions. You can also see the GitHub documentation on pull requests for more details.

Step 5: Cleanup

Assuming everything went well and your old changes are merged in master (after the pull request has been approved) you can now delete the branch you created.

First checkout master: git checkout master

Then delete the branch you created: git branch -d mybranch

You probably also want to pull the latest changes that you merged into master: git pull origin master