Showing posts with label git. Show all posts
Showing posts with label git. Show all posts

Tuesday, September 23, 2014

Starting a git repo

Here are some steps to go through when starting a git repo.

1. Enter the directory which is going to be the repository
2. Create a .gitignore file - Some good rules #change this
3. git init
4. git add . #link to blog on add
5. git commit -m 'Initial commit'6. Now on the git hosting site (e.g. Bitbucket ) create the repo, I prefer lowercase names without spaces.7. git push -u origin master #link to blog on git push
Now to clone:git clone "paths-to-repo"

Friday, September 5, 2014

Pydev project and git repo - ignoring local configurations

The local configuration settings for a pydev project are stored in a hidden file .pydevproject. If we push this file to the repository then every other other remote repository that pulls the repo will get the version of this file that is specific for a particular local machine. In order to avoid this, it is a good idea to add this file to the .gitignore file in the root folder of the git repo.

Typically, here is a list of standard files to add to .gitignore.

 .pydevproject  
 .pyc  

Code formattd using - Code Formatter