Git add # add file to the stage
[file name] add file to stage
. # add all file and sub directories to stage
-all #add all file in current directory
Git commit # commit staged files
-m add a message# " message goes here "
git remote
add # add a remote to remote list
rm # delete a remote from the remote list
git remote add #example
git remote add origin https://github.com/DanielHaro/my_project.git
git init # create a Git repository for current project
git push remote # pushes code to remote site
Master (or any branch) send code to stated branch
git pull remote # pulls data from remote and updates local data
Master(or any Branch) grabs data from stated branch
How to start a new repsoitory
1) Declare the depository on your git site in my case git hub
2) in the root directory of your project issue command ->git init
3) issue-> git add .
4)issue ->git commit -m "inital commit"
5) create remote ie ->git remote add origin https://github.com/DanielHaro/my_project.git
6) git pull origin master
7) git push origin master
That's it your done :)
I started this blog as a personal notepad, but it seems I'm getting more and more hits. Since people are reading this I starting sharing anything that I find interesting or usfull. I'm currently dedicating my time to expanding my knowledge into the more modern languages and ideas. If you find this information useful or a waste of your tome let me know by leaving commits or using the google +1 function at the bottom of the post. Thanks for viewing Daniel Haro
Showing posts with label GIT. Show all posts
Showing posts with label GIT. Show all posts
Saturday, August 11, 2012
GIT HUB: Error while pushing
Error : did you run git update server....
1. I fixed this by updating my remote: the problem is that the url is case sensitive\
Error: files out of Sync
1. to fix this use git pull [remote name] [branch name] #branch name usally master
Error: No branch specified : add brach at end of push or pull comde
1. I fixed this by updating my remote: the problem is that the url is case sensitive\
Error: files out of Sync
1. to fix this use git pull [remote name] [branch name] #branch name usally master
Error: No branch specified : add brach at end of push or pull comde
Subscribe to:
Posts (Atom)