As part of my plans to work more as a developer, I’ve been trying to make more use of version control systems, and in particular git and github. I’ve looked at a few different ways of dong this, such as SourceTree and Github desktop, but something that I wanted to be at least competent in was command line work using Git. Something that I’m doing a lot of is setting up local and remote repositories for my projects, so I thought it would be a good idea to document that process.
Step one: local repository
git init
Step two: make the first change
git add README.md
Step three: commit the first change.
git commit -m "first commit"
Step four: add the remote
git remote add origin <<git URL from website>>
Step five: push the local repository upstream to the master
git push -u origin master git init git add README.md git commit -m "first commit" git remote add origin https://github.com/kheggart/web_app_using_python_and_flask.git git push -u origin master