[MacPorts] WorkingWithGit modified

MacPorts noreply at macports.org
Fri Sep 23 11:01:49 PDT 2016


Page "WorkingWithGit" was changed by ryandesign at macports.org
Diff URL: <https://trac.macports.org/wiki/WorkingWithGit?action=diff&version=54>
Revision 54
Comment: fix typos
Changes:
-------8<------8<------8<------8<------8<------8<------8<------8<--------
Index: WorkingWithGit
=========================================================================
--- WorkingWithGit (version: 53)
+++ WorkingWithGit (version: 54)
@@ -45,7 +45,7 @@
 }}}
 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.
 
-Because of Git's distributed nature, a commit on your local machine is not immediately available on the central server, like it was the case with Subversion. This means that you can continue to prepare further changes in additional commits before you publish your changes as a set. In fact, it is a very common practice in Git to do many small changes that are logically consistent in themselves and then publish them in one step.
+Because of Git's distributed nature, a commit on your local machine is not immediately available on the central server, like it was with Subversion. This means that you can continue to prepare further changes in additional commits before you publish your changes as a set. In fact, it is a very common practice in Git to do many small changes that are logically consistent in themselves and then publish them in one step.
 
 If you have commit access, you can publish your commits using `git push <remote-name> <branch-name>`. `<remote-name>` is the name of the repository to which you want to push. The most common push target is the location you initially cloned, which is automatically named `origin`. `<branch-name>` is the name of the branch you want to push. The Git equivalent to Subversion's `trunk` is called `master`. It is considered best practice to always specify your push target and the branch you are pushing, since git's default is pushing all branches that have a remote equivalent when you run `git push`, which might publish changes that you do not consider final yet (you can disable this behavior by changing the `push.default` git-config setting to `nothing`, see [https://git-scm.com/docs/git-config git-config(1)]).
 {{{
@@ -140,7 +140,7 @@
 
  - To drop uncommitted modifications, use `git checkout -- <filename>`. If you had already added the file to the index using `git add`, you have to unstage it first using `git reset HEAD <filename>`. `git status` prints these commands, so you don't have to remember them.
  - To undo a change that has already been committed and pushed, use `git revert <commitID>`. This will create a new commit that applies the inverse diff. Note that you still have to push this commit to publish it.
- - To throw away all changes that you have locally committed but not yet pushed, use `git reset --hard origin/master`. '''You will loose all your uncommitted and committed modifications.''' If that is not what you want, Git provides a variety of tools that allow you to change commits that you have not pushed yet (and theoretically also commits that have already been pushed, which will prevent you from pushing any changes again). Since this is an advanced topic it will not be covered here. As a pointer for further research, look for `git commit --amend` to change the topmost commit and `git rebase --interactive`, the so-called "interactive rebase", to change older commits.
+ - To throw away all changes that you have locally committed but not yet pushed, use `git reset --hard origin/master`. '''You will lose all your uncommitted and committed modifications.''' If that is not what you want, Git provides a variety of tools that allow you to change commits that you have not pushed yet (and theoretically also commits that have already been pushed, which will prevent you from pushing any changes again). Since this is an advanced topic it will not be covered here. As a pointer for further research, look for `git commit --amend` to change the topmost commit and `git rebase --interactive`, the so-called "interactive rebase", to change older commits.
 
 
 === Repository split === #reposplit
@@ -178,7 +178,7 @@
 
 
 === Checking out a working copy of the ports tree === #cloneports
-To get a working copy of the MacPorts ports tree to start changing ports, clone of copy of the repository:
+To get a working copy of the MacPorts ports tree to start changing ports, clone a copy of the repository:
 {{{
 git clone git at github.com:macports/ports.git # or
 git clone https://github.com/macports/ports.git # if SSH does not work on your network
-------8<------8<------8<------8<------8<------8<------8<------8<--------

--
Page URL: <https://trac.macports.org/wiki/WorkingWithGit>
MacPorts <https://www.macports.org/>
Ports system for macOS

This is an automated message. Someone added your email address to be
notified of changes on 'WorkingWithGit' page.
If it was not you, please report to .


More information about the macports-changes mailing list