User Tools

Site Tools


todo-git

This is an old revision of the document!


git

Make the clone at the remote repository.

git clone git@github.com:dblume/get-shit-done
git remote add upstream git://github.com/icambridge/get-shit-done

Enter a comment for the commit. See section 2.7.2 here.

git commit -a

Double checking the alias names…

$ git remote -v
origin  git@github.com:dblume/get-shit-done (fetch)
origin  git@github.com:dblume/get-shit-done (push)
upstream        git://github.com/icambridge/get-shit-done (fetch)
upstream        git://github.com/icambridge/get-shit-done (push)

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://github.com/realpython/interview-questions.git python-interview
cd python-interview

When it's time to commit

Check which files are staged for commit with git status. Then, when you're ready to commit locally,

git commit -a -m "Some useful comment"

When you're ready to push a local commit to a remote one…

git push https://github.com/dblume/netflix-dvd-feed

Creating a new remote repository from an existing local one

I created hexbright-factory at https://github.com/new. Then, to create a new repository on the command line at the local computer:

touch README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin https://github.com/dblume/hexbright-factory.git
git push -u origin master
todo-git.1401611249.txt.gz · Last modified: 2021/10/24 23:48 (external edit)