Skip to main content

This version of GitHub Enterprise Server will be discontinued on 2024-06-29. No patch releases will be made, even for critical security issues. For better performance, improved security, and new features, upgrade to the latest version of GitHub Enterprise Server. For help with the upgrade, contact GitHub Enterprise support.

Using Git

Use Git to manage your GitHub Enterprise Server repositories from your computer.

About Git

Learn about the version control system, Git, and how it works with GitHub Enterprise Server.

Pushing commits to a remote repository

Use git push to push commits made on your local branch to a remote repository.

Getting changes from a remote repository

You can use common Git commands to access remote repositories.

Dealing with non-fast-forward errors

Sometimes, Git can't make your change to a remote repository without losing commits. When this happens, your push is refused.

Splitting a subfolder out into a new repository

You can turn a folder within a Git repository into a brand new repository.

About Git subtree merges

If you need to manage multiple projects within a single repository, you can use a subtree merge to handle all the references.

About Git rebase

The git rebase command allows you to easily change a series of commits, modifying the history of your repository. You can reorder, edit, or squash commits together.

Using Git rebase on the command line

Here's a short tutorial on using git rebase on the command line.

Resolving merge conflicts after a Git rebase

When you perform a git rebase operation, you're typically moving commits around. Because of this, you might get into a situation where a merge conflict is introduced. That means that two of your commits modified the same line in the same file, and Git doesn't know which change to apply.

Dealing with special characters in branch and tag names

Git is very permissive about what characters are allowed in branch and tag names. When using Git from a command-line shell, you may need to escape or quote special characters.