Posts tagged with “version control

Preventing direct access to hidden files and folders

Hidden files and folders usually contain configuration data and other goodies not intended for public consumption. Git, for example, saves all sorts of useful information in a root-level directory named .git. By default these files and folders don’t appear in a directory listing, but depending on server setup and where they live relative to the […]

Associating a username with a repository

When working with a private repository, GitHub will force you to provide a username and password (or personal access token if two-step authentication has been configured) every time you want to do anything that affects the repository (e.g. clone, pull, push, fetch). If you associate a specific username with the repository (from a user authorized […]

How to avoid a 403 Forbidden error when cloning a private repository

Sometimes when I’m trying to clone a private repository to a remote host, I get a 403 Forbidden error, like so: git clone Initialized empty Git repository in /home/public_html/.git/ error: The requested URL returned error: 403 Forbidden while accessing fatal: HTTP request failed No prompt for a username and password, just the door […]

Excluding directories from version control

The relief and joy I feel after placing a project under version control is usually tempered by the frustration that almost immediately, almost invariably follows the first time I run svn status and see system-generated files in the tmp or cache directories turning up. [I had this happen recently with a site I was building […]

Placing a project under local version control

Before I start work for a client I always push to set up some sort of versioning (usually Subversion), regardless of whether there’s going to be a team doing the development or just me. I store the repository on a separate server, just to give the project the best chance at recovery should something untoward […]

Exporting an individual directory from a repository

If you find yourself needing to export either an individual directory from a repos (say, as part of placing a project under version control) SVN’s export command is the tool for the job. Here’s the standard export syntax: svn export /path/to/repos /target/directory If /target/directory doesn’t exist, SVN, ever accommodating, will create it for you before […]