{"revision": {"id": "f3c0fff7-2f95-11f1-bab0-e86a64d24d78", "node_id": "f3bfddd6-2f95-11f1-9b7d-e86a64d24d78", "user_id": "edc3f576-2f95-11f1-900f-e86a64d24d78", "author": "foxhop", "data": "Set a local repo or global username\r\n=======================================\r\n\r\n.. code-block:: bash\r\n\r\n git config --local user.name \"fox\"\r\n git config --local user.email \"fox@localhost\" \r\n\r\n git config --global user.name \"foxhop\"\r\n git config --global user.email \"foxhop@foxhop.net\"\r\n\r\nHow to push to remote master\r\n================================\r\n\r\ngit push origin master\r\n\r\nHow to add upstream master\r\n\r\n\r\n\r\nBasic github workflow\r\n============================\r\n\r\nupstream\r\n original remote github repo, read-only\r\n\r\n only way to change this repo is to ask for a merge using a pull-request\r\n\r\norigin\r\n forked remote github repo, read-write\r\n\r\n push you changes here and perform pull requests \r\n\r\nlocal\r\n cloned local, read-write\r\n\r\n make changes and push to origin \r\n\r\n pull changes from upstream, perform merges and fast forwards to keep sync'd\r\n\r\nexample using salt repo\r\n-------------------------------\r\n\r\n#. create a remote fork on github\r\n\r\n   press the fork button when logged in\r\n\r\n#. clone the remote fork to your local host\r\n\r\n   .. code-block:: bash\r\n\r\n    cd ~/git\r\n    git clone https://github.com/russellballestrini/salt.git\r\n    cd salt\r\n\r\n#. make some changes to source code and push to remote origin (your github fork)\r\n   \r\n   .. code-block:: bash\r\n\r\n    git add .\r\n    git commit\r\n    git push\r\n\r\n#. perform a pull-request using github gui\r\n\r\n|\r\n\r\nGo on vacation for 1 week\r\n Your local and origin repos now appear out-of-date.  Sync them by performing a fast-forward or merge with upstream.\r\n\r\n|\r\n\r\n#. Tell your local repo about the upstream repo\r\n\r\n   .. code-block:: bash\r\n\r\n    git remote add upstream https://github.com/saltstack/salt.git\r\n\r\n\r\n", "source_format": "rst", "revision_number": 9, "created": 1363691663000}}