Changes between Version 3 and Version 4 of WorkingWithGit


Ignore:
Timestamp:
Aug 20, 2016, 7:59:45 PM (5 years ago)
Author:
neverpanic (Clemens Lang)
Comment:

Add work-in-progress answers to Ryan's questions

Legend:

Unmodified
Added
Removed
Modified
  • WorkingWithGit

    v3 v4  
    11This page should contain information about how to work with [https://git-scm.com git], specifically from the point of view of someone familiar with [https://subversion.apache.org Subversion].
     2
     3== Common `git` tasks while working with ports ==
    24
    35To start:
     
    3537}}}
    3638Then run {{{git commit}}} and everything is set. On your machine. To push to github you then have to run {{{git push}}}.
     39
     40
     41== Common `git` tasks while working with MacPorts base ==
     42
     43=== Checking out a working copy ===
     44The source code of MacPorts itself is no longer managed in the same repository as all ports. Contrary to Subversion, checking out a sub-directory of a repository is not possible with Git. In order to avoid that all port maintainers have to clone the complete history of MacPorts base as well, the Subversion repository has been split into multiple separate repositories. MacPorts base is now available using
     45{{{
     46git clone git@github.com:macports/base.git # or
     47git clone https://github.com/macports/base.git # if SSH does not work on your network
     48}}}
     49
     50See the [#reposplit section on repository splitting during the export] to get an overview of where a path in the old Subversion history is now available in Git.
     51
     52=== Committing changes in your working copy ===
     53A fundamental difference between Subversion and Git working copies is that `svn commit` by default commits all changes in your working copy, but `git commit` by default commits none. Git uses a staging area called "index" that allows you to mark changes for inclusion in the next commit. To add changes to the next commit, use `git add <filename>`. `git status` gives you an overview of the current index and your working copy. Additionally, it lists the commands to revert local uncommitted modifications (`git checkout -- <filename>`) and to remove files from the next commit, but preserve the modifications in your working copy (`git reset HEAD <filename>`).
     54
     55Once you have chosen which files to include in your next commit using `git add`, it is a good practice to review this list using `git status` and show the diff to be committed using `git diff --cached`. When you are satisfied with your changes, run `git commit`, which prompts you for the commit message. See the [#commitmessages section on commit messages in git] for more information on git conventions and expectations in commit messages.
     56
     57
     58== Common `git` tasks & notes about MacPorts' Subversion export ==
     59=== Commit messages === #commitmessages
     60WIP
     61=== Repository split === #reposplit
     62WIP