tulsawebdevs / django-multi-gtfs

Django app to import and export General Transit Feed Specification (GTFS)
http://tulsawebdevs.org/
Apache License 2.0
50 stars 32 forks source link

Alaw005 documentation 1 #40

Closed alaw005 closed 9 years ago

alaw005 commented 9 years ago

Update documentation to include detailed installation instructions (for Ubuntu)

alaw005 commented 9 years ago

I have corrected all typos etc and retested install - I didn't need apt-get update. I am new to git so hopefully all is in order. I also removed claim about working for windows as was probably rather far fetched!

jwhitlock commented 9 years ago

As you found out, Django doesn't have to be specified in requirements.txt. The install_requires line in setup.py brings in Django. In your own project, it makes sense to include a Django==1.6.10 line, so that you have control over upgrading your dependencies. Thanks for backing out that change.

Before merging this, I'd like to squash the later commits into one commit. Run git rebase -i master, and your editor will open with your commits. Something like:

  pick 2926c2f Provide link to example project
  pick 7d41b34 Add detailed installation instructions (Ubuntu)
  pick b0686e3 Fixed typos and added django to requirements.txt
  pick 28911eb Need to include django requirements
  pick 29ff85f Update requirements.txt

Change the last three commits from pick to f:

  pick 2926c2f Provide link to example project
  pick 7d41b34 Add detailed installation instructions (Ubuntu)
  f b0686e3 Fixed typos and added django to requirements.txt
  f 28911eb Need to include django requirements
  f 29ff85f Update requirements.txt

As the help text says, this uses 'fixup', which squashes the commits into the previous commit, but discards the commit messages. This is what I use for typo-level fixes, where people a year from now don't need to know the exact editing process.

When you save and close your editor, git will run the rebase, printing something like:

[detached HEAD 3801a5c] Add detailed installation instructions (Ubuntu)
 Author: Adam Lawrence <alaw005@users.noreply.github.com>
 Date: Thu Apr 30 11:37:48 2015 +1200
 1 file changed, 70 insertions(+)
Successfully rebased and updated refs/heads/alaw005-documentation-1

Then you'll want to push it to github with git push -f. The -f is for force, to replace the current branch with your new branch with re-written history. Force is a bad idea against the master branch, but it often used to clean up feature branches after code reviews.

Here's a longer tutorial on squashing commits, if you need more details: http://davidwalsh.name/squash-commits-git

alaw005 commented 9 years ago

I have completely messed up my repository so have deleted and starting again!

jwhitlock commented 9 years ago

I'm so sorry about that. This has saved my bacon many times, and may help next time: http://sethrobertson.github.io/GitFixUm/fixup.html