Using Repositories

Franz Noel edited this page Nov 16, 2015 · 3 revisions

Using Repositories

Two of the repositories I use are Google Code and Github. Google Code will be deprecated, which previously used SVN and Mercurial, but I'll try to explain how to use only SVN and Git, focusing on command lines (only for the simple ones that I normally use).

Using SVN

  • svnadmin create - initializes an SVN repository.
  • svn checkout repository - (instead of creating) this will checkout the indicated repository from an existing remote SVN server.
  • svn add file array - records the files or folders as an addition to the next commit.
  • svn rm file array - records files or folders as a removal to the next commit.
  • svn commit -m "Message" - commits the file to the repository with a given message.

Using Git

  • git init - initializes a Git repository (if you're creating a repository)
  • git clone repository - Clones the target repository to your local (if you have an existing repository)
  • git checkout branch - checkout the branch inside the local server.
  • git add file array - records the files or folders as addition to the next commit, which will be saved locally.
  • git add file array - records the files or folders as a removal to the next commit, which will be saved locally.
  • git commit -m "Message" - commits the file to the repository with a given message.
  • git branch branchname - creates a new branch.
  • git branch -d branchname - deletes the branch name.
  • git merge branchname - merges the branch to the current branch.
  • git rebase HEAD~2 - from the current branch, it will merge all commits depending on the number specified in HEAD~n.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.