Git is one popular source control nowadays. I have worked with CVS, SVN and just now get to know git.
Things I have done so far:
Installation
I install it on my Windows 8 & Windows XP (32 bits):
- Download the Git for Windows installer package. I installed Git-1.8.3-preview20130601.exe
- I used all default installation instruction
- Local machine configuration:
Configure your username using the following command: git config --global user.name "FIRST_NAME LAST_NAME" Configure your email address using the following command: git config --global user.email "MY_NAME@example.com"
(I created one account at bitbucket – install document follow here)
Some useful commands I started working with git
Add existing project to my git repository
- Go to git bash, Locally, change to the root directory of your existing source
- Initialize the directory under source control: git init
- Add the existing files to the repository: git add .
- Commit the files: git commit -m “message”
- Publish local repo to git server (ex: bitbucket or github)
git remote add origin ssh://username@bitbucket.org/username/yourrepo.git git push -u origin master
Ignore files
Some files or folders, we don’t want to upload to server so we ignore them from commit. Here are some commands I used:
- Add ignore file via Git bash: touch .gitignore
- Copy some default ignore from here
- Commit the file
Just for me, many things to learn about it
My first time, I might miss many things than above so please help to give me some guideline to master on git.
I feel I miss something and not quite sure.
What are the useful commands I should know more about git?
What’s else about it?
Please help to share in comment below to help me and other beginners as well.
3 replies on “Git Beginner – What should I know about git to shart working?”
Got answers feedback from community at Google+ (Cambodia ICT):
The best sites you could start learning Git from basic:
http://try.github.io
http://gitimmersion.com/
lf prefer GUI, then check the links out:
http://git-scm.com/downloads/guis
http://eclipse.github.com/
Those links are very helpful for beginner like me.
Found also this article:
This two articles would bring us to understand about git and also about github, an opensource repo which is so popular now.
More easier to read all the basic in short about Git: here
To setting up the eclipse to pull/commit/push: here (recommended) or here (optional)
The most uses command in Git
– git init
– git add *
– git commit -m “Commit message”
– git push master origin
– git pull
– git status