Skip to content

Mini Guide

filux edited this page Dec 19, 2013 · 13 revisions

cloning:

git clone https://github.com/MegaGlest/megaglest-source.git . && git submodule update --init --recursive


then if you have write access to repo and also prefer ssh, then you should just execute:

com_ad="git@github.com:MegaGlest/megaglest-"; sub_path="data/glest_game"; git config remote.origin.url "$com_ad"source.git; git config submodule."$sub_path".url "$com_ad"data.git; cd "$sub_path"; git config remote.origin.url "$com_ad"data.git; cd ../..



update source:

git pull


update submodule (the most universal way):

git submodule update --init --recursive


for start, basic steps for simpliest commit:

git status

^ check status


git add -u

^ adding every removed/moved/renamed file


git add .

^ adding every modified file and also every new one


git reset

^ if you just added a lot of files (git add ...) and it was somehow a mistake


git clean -ndX

^ check what was ignored, (probably some junk or nothing)


git commit -m 'message'

^ locally commit


git push origin master

^ push to github



small note about submodule: if you want to do anything more advanced than just using it, then on the begining you should choose a submodule branch, e.g.:

git checkout master



graphical tools:

gitg - very simple history viewer

gitk - ^ faster, but not as simple

qgit - ^ good, but based on qt (e.g. on KDE very good)

git gui - something like graphical commit helper

git cola - similar ^

Clone this wiki locally