Show Menu

Git on Webfaction Cheat Sheet by

Usage of Git on Webfaction hosting

Scope of This Cheat Sheet

After following the setup instru­ctions on the Webfaction hosting website, I often forget the rules for naming and creating a new Git repo and cloning that repo. This sheet is meant to be short, and just enough to jog the memory of those who use it.
This cheat sheet assumes you already have a Webfaction hosting account and the knowledge of using its features.

Creating a New Repository

SSH into your Webfaction account
Switch to applic­ation's repos sub directory. cd ~/weba­pps­/gi­t/r­epos
Create the repo. git init --bare {repo}.git {repo} should be the name of the new reposi­tory. The .git extension is required for all reposi­tor­ies!
Switch to the new repo's directory. cd {repo}.git Where {repo} is the name of your newly created reposi­tory
Enable HTTP push. While in the newly created repo's directory, run: git config http.r­ece­ivepack true
Quick note on naming new reposi­tories:
A. The .git extension is required on all repository names
B. There can only be one dot (.) in the reposi­tory's name, and that should preceed the git extension


Cloning a Repository

Git Command
git clone /home/­use­rna­me/­web­app­s/a­pp/­rep­os/­pro­j.git
HTTP (Anon)
git clone http:/­/do­mai­n/U­RL_­PAT­H/p­roj.git
HTTP (Auth)
git clone http:/­/gi­t_u­ser­@do­mai­n/U­RL_­PAT­H/p­roj.git
git clone userna­me@­use­rna­me.w­eb­fac­tio­­/us­ern­ame­/we­bap­ps/­app­/re­pos­/pr­oj.git
Links in the above commands do not work
If you plan on adding large file, a mass quantity of files, or making many changes to your repository between pushes and pulls, consider changing the postBuffer setting on your local repositry clone.

1. Switch to the clone of the repo
2. Execute git config http.p­ost­Buffer {{bytes}} where bytes is the maximum number of bytes permitted.

Example: To allow for a push of up to 500 MB, execute git config http.p­ost­Buffer 524288000

Removing a Git Repository

Read the warning note below!!!
SSH into your Webfaction account
Enter your repos sub-di­rectory cd ~/weba­pps­/gi­t/r­epos
Execute rm -r {{repo}}.git to remove the repository {{repo}}.git
Removing a repository cannot be undone by you or a member of the Webfaction team! If you remove a repo, it is solely on you...r­emove with caution!

Help Us Go Positive!

We offset our carbon usage with Ecologi. Click the link below to help us!

We offset our carbon footprint via Ecologi


No comments yet. Add yours below!

Add a Comment

Your Comment

Please enter your name.

    Please enter your email address

      Please enter your Comment.

          Related Cheat Sheets

          Git Cheat Sheet
          Bash Dev Cheat Sheet

          More Cheat Sheets by DeeJRoth

          Total Commander Button Bar Parameters Cheat Sheet
          rvm cheat sheet Cheat Sheet