Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
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).
- 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.
- 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.