Seasonal Greetings in Chinese

I’m practicing my Chinese greetings and salutations. Common for all the forms presented here is the ending 快樂 – kuàilè – literarily “quick music”, the word being “happy” or “merry”.

My friend just had a birthday; the proper form is 生日快樂 – Shēngrìkuàilè. Broken down it litteraly means: 生 Shēng – to be born, 日 rì – day. So 生日 is birthday, and the whole phrase is “Happy Birthday!”

Soon, Christmas is coming. The proper greeting is 聖誕快樂 – Shèngdànkuàilè. The first syllable is almost the same as the previous example, just a tonal difference. But in this case 聖 Shèng means “holy”, and 誕 dàn is “birth/birthday”. So, “holy birth” = “Christmas”. The whole form then becomes “Merry Christmas!”

In the western world, New Year is fast approaching after xmas. In China, the Chinese New Year is still one month away, but… The proper seasonal greeting is 新年快樂 – Xīnniánkuàilè. This one is easy; 新 Xīn is “new”, and 年 nián is “year”. So it is not difficult to arrive at “Happy New Year!”

So, whatever your occasion; have a happy one!

Using personal git with cvs

If you are stuck using cvs in your dayjob, you may still get some mileage out of git. I will not discuss the cvs-git roundtrip tools, but rather how you can use git as a simple personal workflow enhancement.

First time setup

After installing git, remember to set your name and email in the global settings: 

git config --global "Your Name"
git config --global
git config --global core.excludesfile ~/.gitignore

See ‘man git-config’ for other cool settings… 

Using git locally

I mainly use Git as a local “convenience” of sorts with CVS. I check out a module from CVS, and then do the following inside the toplevel directory: 

git init
git add .
git commit -m 'initial import'

NOTE: for this to work best, I have a global ~/.gitignore on ‘CVS’ and ‘.cvsignore’, to avoid versioning cvs metafiles in the local git repository… 

Then, I can work with the files locally, and commit small changes to git, revert my changes, etc. Whenever I feel like integrating new changes from other people, I do a 

cvs update

I can then use ‘git status‘ and ‘git diff‘ to look at what has happened, and resolve conflicts etc.

If I have made local changes not in CVS, I commit it to CVS. If I have made many small changes in git, this then ends up as a nice “atomic” bigger commit to CVS.

Once CVS is up-to-date with my changes, I usually then just commit everything change in CVS to git with 

git commit -a -m 'cvs sync'

If I do this several times without intervening local check-ins, I use the --amend option to git commit, to just add the new changes to the previous commit.

Using local branches and rebasing on CVS head

For the “advanced” user, it is very cool to do own development on a branch, and just leave the master to be in sync with CVS. 

git branch my_branch
git checkout my_branch
... work ...
git commit ...whatever...

I then switch back to master to sync with cvs, and then rebase the branch on head 

git checkout master
cvs update
git commit -a -m 'cvs sync'
git checkout my_branch
git rebase master
(possibly fix merge conflicts and...) git rebase --continue

Now, the branch is updated to be as if from the tip of HEAD, so future merges to CVS are easier.