Git Operations: Pull, Branches, Commits
Deploy your code from Git, without a terminal
Deploy your code from Git
A project added with a Git repository is a checkout of it. From the project page you pull new code, switch branches, look at what changed and go back to an older commit, without opening a terminal.
01 · The buttons
Shows the Repository address. Change the SSH Port with Update Port. Add, replace or remove the Deploy Key with Save Deploy Key or Remove Key.
Fetches the new commits and merges them into the site's files. A window shows the output.
Updates the remote branches without changing any file of the site.
Lists the branches, with a search box. Click one to check it out.
Git Settings: the repository address, the SSH port and the deploy key.
02 · See what changed
- Git Status lists the files changed on the server and not committed. Type in Filter files... to find one.
- Recent Commits lists the latest commits. The file icon on a commit shows its differences from the current one (HEAD).
03 · Go back to an older commit
- In Recent Commits, click the short hash of the commit. Or click Checkout and type any commit hash.
- Confirm. The site's files now match that commit.
04 · Private repositories
A private repository needs a deploy key. The key has two halves, and each goes to a different place:
The public half to your Git provider, the private half to Opensolr.
- Create an SSH key pair for this site on your own computer.
- Add the public key to your Git provider as a deploy key of the repository.
- Paste the private key in Deploy Key (SSH Private Key): when you add the project, or later in Git Settings.
- Use the SSH address of the repository, for example
git@github.com:user/repo.git. If your Git server uses another SSH port, set Git SSH Port.
05 · Projects without a repository
A project can be added with no Git repository at all: an empty folder with its virtual host, for files you put there yourself (a built site uploaded over SSH, for example). In Git Settings such a project shows Repository: Not configured, and the Git buttons answer Not a git repository.
To connect a repository later:
- Make sure the project folder is empty. The first Git setup clones the repository into it, and refuses a folder that already holds files.
- Open Git Settings. For a private repository, paste its deploy key and click Save Deploy Key first.
- Under Repository, type the address, for example
git@github.com:user/repo.git, and the branch. Leave the branch empty for the repository's default one. - Click Connect Repository. A window follows the clone line by line. When it ends, Git Pull, Git Fetch and Switch Branch work as on any other project.
Need a Git command these buttons do not have? Run it in the Terminal; commits made there carry your name and email.
