Archive

Posts Tagged ‘Git’

AOSP source code back online

October 21st, 2011 No comments
Hi!
As you know, like many other projects the Android Open-Source Project was affected by the recent kernel.org downtime. So, we’re pleased to let you know that the Gingerbread source code is now available again, and AOSP git servers are back online.
Even before the kernel.org downtime, it was clear that AOSP was sometimes taxing kernel.org’s git infrastructure. When we did the Gingerbread source release, for example, load due to AOSP made part of kernel.org unusable for several days. This isn’t fair to kernel.org’s staff or the community, so for some time we’ve been preparing our own git hosting on Google servers.
We were finishing up just as kernel.org experienced their downtime, so the Gingerbread source is now available on Google’s servers. Accordingly, the git URLs have changed.
Here are the instructions to access the new git servers:
There are a few limitations to be aware of:
  • Our priority has been getting the main source code mirrors back online, so for the moment gitweb source browsing and Gerrit Code Review are still unavailable.
  • We are now working on bringing AOSP’s Gerrit Code Review site back up, and hope to be able to say something here soon.
  • It might be a little while longer before gitweb comes back, unfortunately, since Gerrit Code Review is the next priority.
  • To reiterate, these servers contain only the ‘gingerbread’ and ‘master’ branches from the old AOSP servers. We plan to release the source for the recently-announced Ice Cream Sandwich soon, once it’s available on devices.
  • As these new servers are, well, new, there may be hiccups if we encounter unexpected issues. However we’re keeping a close eye on them and will respond to any issues as quickly as possible.
Finally, we’d like to send a huge “thank-you” to the kernel.org community and Oregon State University Open-Source Lab staff. They’ve done an incredible job hosting the AOSP source code mirror and Gerrit Code Review for nearly 3 years. Without them, it’s safe to say that AOSP would not be where we are today.
Thanks, and happy coding!
- Dan
– EOF –

优化gitk字体显示

June 16th, 2011 1 comment

gitk图形界面对于中文不友好,中文显示字体怪怪的, 由于gitk是用Tcl/Tk写的工具,默认使用Tk 8.4,不支持抗锯齿,因此字体显示很难看。在Tk 8.5支持了部分抗锯齿字体,修改gitk使用Tk 8.5后显示效果会好一点。

解决方案, 安装Tk8.5,并选为默认:

sudo apt-get install tk8.5
sudo update-alternatives –config wish

选择 “–> select /usr/bin/wish8.5″.

这样gitk的字体就会好看很多,一般习惯吧字体设置为”DejaVu Sans Mono”. 修改 ~/.gitk文件替换原来的字体:

set mainfont    {{DejaVu Sans Mono} 9}
set textfont    {{DejaVu Sans Mono} 9}
set uifont      {{DejaVu Sans Mono} 9 bold}

如果想使用”文泉驿”字体也可以在~/.gitk里面配置,前提是你需要安装相关的字体。

sudo apt-get install ttf-wqy-microhei ttf-wqy-zenhei xfonts-wqy
vim ~/.gitk
set mainfont {文泉驿等宽正黑 9}
set textfont {文泉驿等宽正黑 9}
set uifont {文泉驿等宽正黑 9 bold}

– EOF –

Categories: Tech.Notes Tags: , , , , , ,

git failed to push some refs

June 14th, 2011 No comments

错误信息:

bvcom@ubuntu:~/tmp/AR6kSDK.2.2.1.180$ git push
Counting objects: 29, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (12/12), done.
Writing objects: 100% (15/15), 1.53 KiB, done.
Total 15 (delta 7), reused 0 (delta 0)
remote: error: refusing to update checked out branch: refs/heads/master
remote: error: By default, updating the current branch in a non-bare repository
remote: error: is denied, because it will make the index and work tree inconsistent
remote: error: with what you pushed, and will require ‘git reset –hard’ to match
remote: error: the work tree to HEAD.
remote: error:
remote: error: You can set ‘receive.denyCurrentBranch’ configuration variable to
remote: error: ‘ignore’ or ‘warn’ in the remote repository to allow pushing into
remote: error: its current branch; however, this is not recommended unless you
remote: error: arranged to update its work tree to match what you pushed in some
remote: error: other way.
remote: error:
remote: error: To squelch this message and still keep the default behaviour, set
remote: error: ‘receive.denyCurrentBranch’ configuration variable to ‘refuse’.
To git://192.168.2.212/AR6kSDK.2.2.1.180/.git
! [remote rejected] master -> master (branch is currently checked out)
error: failed to push some refs to ‘git://192.168.2.212/AR6kSDK.2.2.1.180/.git’

解决方法:
这是由于git默认拒绝了push操作,需要进行设置,修改.git/config添加如下代码:

[receive]
denyCurrentBranch = ignore

在初始化远程仓库时最好使用 git –bare init 而不要使用:git init
如果使用了git init初始化,则远程仓库的目录下,也包含work tree,当本地仓库向远程仓库push时, 如果远程仓库正在push的分支上(如果当时不在push的分支,就没有问题), 那么push后的结果不会反应在work tree上, 也即在远程仓库的目录下对应的文件还是之前的内容,必须得使用git reset –hard才能看到push后的内容.

1. http://hi.baidu.com/wbo4958/blog/item/8613d68619b0522666096eff.html
2. http://hi.baidu.com/zkfarmer/blog/item/4a4bfd0899db95336a60fb42.html

–EOF–

Categories: Tech.Notes Tags: , , ,

Google Code 与 Github同步

September 28th, 2010 No comments

由于Golang中文翻译项目同时采用Google Code和Github两种方式管理,这里简单的记录一下流程.

1. 从Google Code代码库里面取得历史数据
border@colinux:~/work/golang-china$ git svn clone https://golang-china.googlecode.com/svn/trunk .
border@colinux:~/work/golang-china$ git branch -a
* master
remotes/git-svn

2. 增加Github源
border@colinux:~/work/golang-china$ git remote add github git@github.com:border/golang-china.git
同步github
border@colinux:~/work/golang-china$ git fetch github
remote: Counting objects: 37, done.
remote: Compressing objects: 100% (27/27), done.
remote: Total 30 (delta 14), reused 13 (delta 3)
Unpacking objects: 100% (30/30), done.
From github.com:border/golang-china
* [new branch] master -> github/master

border@colinux:~/work/golang-china$ git branch -a
* master
remotes/git-svn
remotes/github/master

border@colinux:~/work/golang-china$ git branch -r
git-svn
github/master

给github的源创建一个单独的分支
border@colinux:~/work/golang-china$ git checkout -b github github/master
Branch github set up to track remote branch master from github.
Switched to a new branch ‘github’

border@colinux:~/work/golang-china$ git branch
* github
master

border@colinux:~/work/golang-china$ git branch -a
* github
master
remotes/git-svn
remotes/github/master

border@colinux:~/work/golang-china$ git status
# On branch master
nothing to commit (working directory clean)

border@colinux:~/work/golang-china$ git branch
github
* master

3. 在master分支基础之上创建一个自己的分支用于与GoogleCode和Github进行合并
border@colinux:~/work/golang-china$ git checkout -b border
Switched to a new branch ‘border’

查看当前多有得分支
border@colinux:~/work/golang-china$ git branch -a
* border
github
master
remotes/git-svn
remotes/github/master

现在可以在border分支上与github合并
border@colinux:~/work/golang-china$ git merger github

解决一些冲突后,然后border分支目前是最新的版本。

接下来分别切换到master和github分支,并与border进行合并。

border@colinux:~/work/golang-china$ git checkout master
border@colinux:~/work/golang-china$ git merger border
在master分支下,提交相关的版本
border@colinux:~/work/golang-china$ git svn dcommit // 上传本地的代码到Google Code

border@colinux:~/work/golang-china$ git checkout github
border@colinux:~/work/golang-china$ git merger border
border@colinux:~/work/golang-china$ git push

git svn rebase // 本地与Goolge Code 代码同步
git svn dcommit // 上传本地的代码到Google Code

1. git-remote(1) Manual Page http://www.kernel.org/pub/software/scm/git/docs/git-remote.html
2. Google Code 与 Github代码同步 http://wifihack.net/blog/2010/01/google-code-svn-and-github-sync/
3. 混合使用Git SVN 和Git http://zoomquiet.org/res/scrapbook/ZqFLOSS/data/20081212152336/index.html

Categories: golang, Tech.Notes Tags: , , ,

Google Code 与 Github代码同步

January 26th, 2010 No comments
git config --global user.name "Bian Jiang"
git config --global user.email borderj@gmail.com
git svn clone https://golang-china.googlecode.com/svn/trunk -s
git remote add origin git@github.com:border/golang-china.git
git push origin master
git svn rebase // 本地与Goolge Code 代码同步
git push // 上传本地的代码到github
git svn dcommit // 上传本地的代码到Google Code 

在Github上创建ssh授权参考: http://wifihack.net/blog/2008/12/permission-denied-on-github/

–EOF–

http://www.wifihack.net

Categories: Tech.Notes Tags: , , , ,