There will be a lot of situations where you find some useful tool in github , then you start using it, in the middle of it, you hit a roadblock and the owners of tool aren’t ready yet to fix it as soon as you want, what do you do ?
Do It Yourself
- get the url of your project you want to clone and run this command git clone git://github.com/<usernameofrepo>/<projectname>.git
- cd <projectname>.git
- the main project will keep on changing but if you want to fix something in a particular version then
- git checkout <version of a tag> eg: git checkout 0.2.1
- using vi or any edit and make all the changes you need, save the files
- ‘git status’ command will show all the changes you have made
- ‘git diff’ will show the diff
- git add .
- git commit -m ‘comment for your fix’
- git tag <new version by tagging> eg: git tag 0.2.2
- https://github.com/ and follow the instructions on first and second boxes
- https://help.github.com/articles/generating-ssh-keys to add ssh keys so you can connect via ssh to your github a/c
- open ~/.git/config and change url under “remote “origin”” to https://github.com/<username>/yourproject.git
- add the following section to the config file
- [remote “upstream”]
url = https://github.com/<path/to/original/project.git>
fetch = +refs/heads/*:refs/remotes/upstream/*
- git push origin master
- git push –tags
- Verify if the changes are reflecting in your github a/c
These are very basic steps that will help you clone a project , fix something, push the change to your a/c. Then you can send the project owner a pull request so they can review and merge your fix into their project. Hope this will help you take first step towards Git!
Thats all folks!