23 | | == Common `git` tasks & notes about MacPorts' Subversion export == |
24 | | |
25 | | === Getting a working copy === |
26 | | To start working with git, you need a copy of the sources. Follow the sections for [#cloneports getting the ports tree] or [#clone MacPorts base], depending on where you want to make changes, then continue with the next section. |
| 23 | == Common `git` tasks == #tasks |
| 24 | |
| 25 | |
| 26 | === Cloning a repository === #cloning |
| 27 | |
| 28 | Obtaining a local copy of a Git repository is called "cloning" because you usually end up with a carbon copy of the source repository. GitHub allows cloning over [https://help.github.com/articles/which-remote-url-should-i-use HTTPS or SSH]: |
| 29 | {{{ |
| 30 | $ git clone https://github.com/macports/macports-ports.git |
| 31 | }}} |
| 32 | {{{ |
| 33 | $ git clone git@github.com:macports/macports-ports.git |
| 34 | }}} |
| 35 | Both of these create a `macports-ports` directory containing a working tree at the latest commit, with the repository itself—with full history—at `macports-ports/.git`. |
| 36 | |
| 37 | (A list of our repositories is available at [[FAQ/GitHubMigration#repositories]].) |