todo-git
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
todo-git [2014/06/08 23:11] – dblume | todo-git [2022/02/04 15:02] (current) – removed dblume | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== git ====== | ||
- | Make the clone at the remote repository. | ||
- | |||
- | < | ||
- | git clone git@github.com: | ||
- | </ | ||
- | |||
- | < | ||
- | git remote add upstream git:// | ||
- | </ | ||
- | |||
- | Enter a comment for the commit. | ||
- | < | ||
- | git commit -a | ||
- | </ | ||
- | |||
- | Double checking the alias names... | ||
- | |||
- | < | ||
- | $ git remote -v | ||
- | origin | ||
- | origin | ||
- | upstream | ||
- | upstream | ||
- | </ | ||
- | |||
- | The push that worked from within the local directory: | ||
- | |||
- | < | ||
- | git push origin | ||
- | </ | ||
- | |||
- | ===== Make a local clone of an existing remote project ===== | ||
- | |||
- | From the parent directory: | ||
- | |||
- | < | ||
- | git clone https:// | ||
- | cd python-interview | ||
- | </ | ||
- | |||
- | ===== When it's time to commit ===== | ||
- | |||
- | Check which files are staged for commit with '' | ||
- | |||
- | < | ||
- | git commit -a -m "Some useful comment" | ||
- | </ | ||
- | |||
- | When you're ready to push a local commit to a remote one... | ||
- | |||
- | < | ||
- | git push https:// | ||
- | </ | ||
- | |||
- | ===== Creating a new remote repository from an existing local one ===== | ||
- | |||
- | I created hexbright-factory at [[https:// | ||
- | |||
- | < | ||
- | touch README.md | ||
- | git init | ||
- | git add README.md | ||
- | git commit -m "first commit" | ||
- | git remote add origin https:// | ||
- | git push -u origin master | ||
- | </ | ||
- | |||
- | ===== Creating a new remote repository from an existing local one ===== | ||
- | |||
- | I created wine-tasting at [[https:// | ||
- | |||
- | < | ||
- | ~$ mkdir wine-tasting | ||
- | ~$ cd wine-tasting/ | ||
- | wine-tasting$ vim README.md | ||
- | wine-tasting$ vim LICENSE.txt | ||
- | wine-tasting$ git init | ||
- | wine-tasting$ git add README.md | ||
- | wine-tasting$ git add LICENSE.txt | ||
- | wine-tasting$ git add test.py | ||
- | wine-tasting$ git add wine_allocator.py | ||
- | wine-tasting$ git commit -m "first commit" | ||
- | wine-tasting$ git remote add origin https:// | ||
- | wine-tasting$ git push -u origin master | ||
- | </ |
todo-git.1402294273.txt.gz · Last modified: 2023/04/12 20:44 (external edit)