a helpful primer for users sick of git's poorly-named commands
I've used Git since 2011, and this is the stuff that I've always had to Google to remember. I hope it helps you not hate Git so much.
| #!/usr/local/bin/python | |
| """ | |
| To use this script, you must be in the root directory of a Rails project that | |
| is using git. You should also make sure that your directory does not contain any | |
| uncommitted changes. Then run: | |
| $ python rails_switch_branch.py name_of_another_branch | |
| Running the above will do the following: |
| """ | |
| This fabric script automates the creation of a virtual environment and a Django | |
| project. The result will be virtual environtment with the name of the project. | |
| The folder namer where the project code will be placed is specified in | |
| SOURCE_DIRECTORY_NAME, a static root folder will be created and settings.py | |
| will be updated. | |
| """ | |
| try: | |
| from fabric.api import env, run, local | |
| from fabric.context_managers import lcd, prefix |
| " Factories and Configuration | |
| Rnavcommand config config -suffix=.yml -default=application | |
| Rnavcommand factory spec/factories test/factories -suffix=.rb -default=model() | |
| " Backbone | |
| Rnavcommand bmodel app/assets/javascripts/backbone/models -suffix=.coffee -default=model() | |
| Rnavcommand bview app/assets/javascripts/backbone/views -suffix=.coffee | |
| " Apotomo Widgets (Cells) | |
| Rnavcommand widget app/widgets -suffix=_widget.rb |
In this document I am using Sass's SCSS syntax. You can choose to use the indented syntax in sass, if you prefer it, it has no functional differences from the SCSS syntax.
For Less, I'm using the JavaScript version because this is what they suggest on the website. The ruby version may be different.