Pushing to Remote Branches Procedure - rsanchez-wsu/jfiles GitHub Wiki
Committing Procedures:
You can watch a video on the process here: https://www.youtube.com/watch?v=cHTfuh68Mpw&t=1m37s
To Push your work to a Remote branch on GitHub follow these guidelines:
- Make sure you have committed your work and that your workspace is clean:
- Check for warnings in your workspace, especially in files you have touched (the yellow triangular warning sign with an exclamation point decorates files with warnings), and clean up the warnings.
- Review all of your changes prior to making your commit (assuming you are going to commit on the branch you have checked out currently, you can right click on the JFiles project and select Compare With->HEAD Revision)
- Browse the tree in the Synchronize view on the left, double-clicking on each file and reviewing what you have changed.
- Confirm that all the changes are expected.
- If you find anything unexpected, return to the Java perspective and fix any problems, then return to the comparison.
- Once all of changes are acceptable, go to the Git Staging view.
- Drag the files you want to commit from the Unstaged Changes area to the Staged Changes area (you can break up your work into more than one commit if the change is too big or if you ended up working on more than one task)
- Enter a commit message (guidelines are lower down on this page) and click the Commit button (not the Commit and Push... button, because you need to do a few things before you can push)
-
On the command line navigate to the folder where the project is stored, and verify your work integrity by running "ant clean test". Example: On Windows open PowerShell enter for example: "cd C:\Users\phare_000\git\jfiles" followed by "ant clean test"
-
If you get "BUILD SUCCESSFUL" proceed to step 2.
-
If you get "BUILD FAILED" correct the problem and try again. Inside the project "build" folder the "checkstyle" and "findbugs" folders will contain any error or warning reports that were generated by a failed build.
-
-
Open Travis dashboard https://travis-ci.org/rsanchez-wsu/jfiles This is where you watch to see if your code breaks the online Remote branch.
-
If you have not already done so, commit your work locally through Eclipse.
-
Pull. In the Git view in Eclipse right click your branch and select Pull. This collects any changes from the Remote version of your branch and ensures you are up to dated.
-
Resolve Conflicts. If any conflicts occur you will get a message about it and your project files will contain a red double diamond. After you finish cussing you will need to manually resolve the conflicts. You may need to contact other team members to help untangle the mess. After you have resolved the conflict begin again at step 1.
-
Push. In the Git view in Eclipse right click your branch and select "Push to Upstream". Warning: Do not Push unless you have pulled, resolved any conflicts and received a Successful Build from an ant clean test. Otherwise you could be pushing garbage. Remember: “Garbage in, garbage out!” --Oscar the Grouch, Muppet, Computer Scientist, and Garbage Enthusiast.
This is an example of good Commit Comments and yes the spacing in between lines is intentional.
Description Title
Longer complete description that references any issues this commit referenced, such as the issue #22 seen below.
Fixes #22
I have provided a visual example of how to make a commit, and this example uses git bash. Start by using the command cd "C:\Users\Andrew Ribar\git\jfiles", for example, those are your files that you made changes to. Then type git add . then git commit -m and type your message in quotes. And wallah! If you would like to see your changes type the command git status.