Show Menu
Cheatography

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

1.
SSH into your Webfaction account
2.
Switch to applic­ation's
repos
sub directory.
cd ~/weba­pps­/gi­t/repos
3.
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­tories!
4.
Switch to the new repo's directory.
cd {repo}.git
Where {repo} is the name of your newly created repository
5.
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

Examples:
repo
repo.git
repo.c­om.git

Cloning a Repository

Type
Git Command
Local
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
SSH
git clone userna­me@­use­rna­me.w­eb­fac­tio­nal.com:/home­/us­ern­ame­/we­bap­ps/­app­/re­pos­/pr­oj.git
NOTE
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

1.
Read the warning note below!!!
2.
SSH into your Webfaction account
3.
Enter your repos sub-di­rectory
cd ~/weba­pps­/gi­t/repos
4.
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!
 

Comments

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

          More Cheat Sheets by DeeJRoth

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