"Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency."
To start a Git project create project folder somewhere, for example /home/xubuntu/project
$ cd /home/xubuntu
$ mkdir project
$ cd project
Make a hidden .git folder inside project folder
$ git init
with status command we can see the status of course.
$ git status
Create a new file, for example:
$ nano teksti.txt
Add some text, save and quit the file.
Then add it to Git and commit.
$ git add . (remember the dot here it copies all files then.)
$ git commit
Add some commit message and apply. With git log command you can see what happened.
$ git log
Log command shows for example file author, time and the message what has changed.
If something goes wrong you can reset everything, but be very careful with this command.
$ git reset --hard HEAD
Now is time to register in Git.
You can pull all codes from folder with:
$ git clone git://github.com/shnigi/try_git.git /home/xubuntu/mygrit
Where "shnigi" is your account name "try_git" your project folder or name and after that the path where to save the file.
From offline to online --> http://terokarvinen.com/2012/git-from-offline-to-network
$ sudo apt-get install giggle (gui for git ?)
Ei kommentteja:
Lähetä kommentti