Page 1 of 1

how to use git

Posted: Tue May 14, 2013 7:34 am
by GHETTOCHiLD
so this is a total n00b question, but how do you use git? i have it installed but i have no clue on how to setup my package so i can begin tracking changes to it. any help would be appreciated.

Re: how to use git

Posted: Wed May 15, 2013 6:26 pm
by James.W@AST
Hi there,

You should be able to find a lot of tutorials about git on the Internet, such as:
http://www.vogella.com/articles/Git/article.html

JW

Re: how to use git

Posted: Thu Dec 26, 2013 8:55 pm
by kalleankan
I agree with the earlier. Ive read git tutorial and still dont know how to use it. Asusstor port dont give any information on what port or what protocol they use for instance.

I still want subversion app.

Re: how to use git

Posted: Fri Dec 27, 2013 7:15 am
by MrK
MMhh, what do you expect from git? git is distributed version control system and to use it one has to access the command line of the NAS. That's the default interface of git and that's what is installed by that package. Everything else are additional front ends. Whatever web, GTK, Mac or Windows.

You access your NAS by SSH and there you can set up repositories. If you'd like to use your NAS to host your git repos and other people should be able to access these repos on your NAS that's a different story. You're looking at front-ends for git.
You'll then want to look at gitosis. I haven't set up it on a NAS (and obviously there's no packages for it yet) but I'm sure others have done so and the Internet will help. There are probably others products like gitosis but I personally use github.com which does an execellent job.

Re: how to use git

Posted: Fri Dec 27, 2013 7:25 am
by MrK
GHETTOCHiLD wrote:so this is a total n00b question, but how do you use git? i have it installed but i have no clue on how to setup my package so i can begin tracking changes to it. any help would be appreciated.
If you're developing a package for ASUSTOR I'd do the developing on a desktop machine (Linux). If that's not possible for whatever reason then you'll connect to your NAS (SSH) and set up an empty repository and copy your files into that directory. Then you'll add this files to that repo and commit (track) the changes. E.g.:

Code: Select all

$ mkdir -p /volume1/Public/first-git-project
$ cd /volume1/Public/first-git-project
## initialize an empty repository
$ git init
## <copy the files into this folder>
## add all files, that's what the '.' is for. Add selected files by git add <filename or folder>
$ git add . 
$ commit -a -m "This is commit message which will is a description what that commit is for"
The linked tutorial in a earlier post show much better how to do it though, in chapter nine.

Re: how to use git

Posted: Sun Nov 06, 2016 3:08 am
by TiniB
I realise this thread is getting a bit old but it is the closest to what i want to ask

I don't know if i am being foolish but all the tutorials about setting up a git repo refer to setting up a GIT user on the server side. Presumably this is for security reasons as you can then force it to use a restricted GIT shell once set up.

According to the Asustor manual for the 302T i am using it says that, for security reasons, ssh access is locked down to only the admin and root accounts. Therefore the GIT user i have set up cannot ssh into my NAS. I imagine that the way around this is to just ssh through the admin account but i see this as bad practice.

Is there anyway to add the git user to a list allowing it access? (either in the web interface or the CLI) i have tried adding an ALLOWUSERS line to the ssh_config but that seems to have no affect. (in fact there are two ssh_config files and i have edited each one individually).

As a sanity check i have just set up a git repo on my raspberry pi using the same instructions and access via ssh worked perfectly.