Development using git with write access: Difference between revisions

From Alpine Linux
m (→‎Git Clone: small fix)
(minor cleanup)
Line 1: Line 1:
'''''Note:''' Unless you are a developer with ssh access (with permissions) you should instead read the article "[[Development_using_git|Development using git]]"''
This document is for developer who has ssh login and write access to the git repositories.


== Personal settings ==
== Personal settings ==
Start by telling your git who you are and some other useful information ('user.name' will show up in http://git.alpinelinux.org when you commit your changes).
Unless you already done so, start by setting up name and email address for the git commits.


  git config --global user.name "Your Full Name"
{{Cmd|git config --global user.name "Your Full Name"
  git config --global user.email "your@email.address"
git config --global user.email "your@email.example.com"}}


== Git Clone ==
== Git Clone ==
Some examples:
Some examples:


  git clone ssh://username@git.alpinelinux.org/gitroot  ''(This would fetch all available git projects)''
{{Cmd|git clone ssh://username@git.alpinelinux.org/gitroot/acf-core
  git clone ssh://username@git.alpinelinux.org/gitroot/acf-core   ''(Fetch a single project)''
git clone ssh://username@git.alpinelinux.org/gitroot/pingu}}
  git clone ssh://username@git.alpinelinux.org/gitroot/pingu   ''(Fetch a single project)''
 
Check http://git.alpinelinux.org/ to see what alternatives you have.<BR>
You might not have permissions to clone all existing projects.


== Git Tag ==
== Git Tag ==
Create an annotated tag.
Create an annotated tag and push it.


  git tag -a ''tagname'' -m'commit message (e.g release 1.x)'
{{Cmd|git tag -a ''tagname'' -m'commit message (e.g release 1.x)'
  git push && git push --tags
git push && git push --tags}}


== Create new project ==
== Create new project ==
Create your own dir that you want to become your new acf-mystuff project.<BR>
Create your own dir that you want to become your new acf-mystuff project.
Now initiate git.
{{Cmd|mkdir|acf-mystuff
cd acf-mystuff
cd acf-mystuff
git init
git init}}
 
Create your files and add/commit them to your git-project
Create your files and add/commit them to your git-project
git add ./
{{git add ./
git commit
git commit}}
'''''Note:''' You can add/modify/commit as much as you want before uploading it to git.alpinelinux.org


git clone --bare acf-mystuff acf-mystuff.git
{{Note|You can add/modify/commit as much as you want before uploading it to git.alpinelinux.org}}
scp -r acf-mystuff.git user@dev.alpinelinux.org:


Notify a user with root access to install the git repository
=== Upload the new project ===
{{Cmd|<nowiki>cd ..
git clone --bare acf-mystuff acf-mystuff.git
scp -r acf-mystuff.git user@dev.alpinelinux.org:</nowiki>}}


== References  ==
Notify a user with access on git.alpinelinux.org to move it to /gitroot (or create a symlink) and update the /etc/cgitrc config to make it visible on cgit.
See [[Development_using_git#References]] for references.

Revision as of 09:24, 6 August 2010

This document is for developer who has ssh login and write access to the git repositories.

Personal settings

Unless you already done so, start by setting up name and email address for the git commits.

git config --global user.name "Your Full Name" git config --global user.email "your@email.example.com"

Git Clone

Some examples:

git clone ssh://username@git.alpinelinux.org/gitroot/acf-core git clone ssh://username@git.alpinelinux.org/gitroot/pingu

Git Tag

Create an annotated tag and push it.

git tag -a tagname -m'commit message (e.g release 1.x)' git push && git push --tags

Create new project

Create your own dir that you want to become your new acf-mystuff project.

mkdir

Create your files and add/commit them to your git-project {{git add ./ git commit}}

Note: You can add/modify/commit as much as you want before uploading it to git.alpinelinux.org

Upload the new project

cd .. git clone --bare acf-mystuff acf-mystuff.git scp -r acf-mystuff.git user@dev.alpinelinux.org:

Notify a user with access on git.alpinelinux.org to move it to /gitroot (or create a symlink) and update the /etc/cgitrc config to make it visible on cgit.