git只保留最新代码,删除历史记录

Post on: Category: 学习笔记Tag: Git No Comments Yet

git cat-file commit master^X | sed -e '/^parent/ d' > tmpfile
git rebase --onto $(git hash-object -t commit -w tmpfile) master
rm -f tmpfile

Read More...

Moving Projects from GoogleCode to GitHub

Post on: Category: 学习笔记Tag: GoogleCode,GitHub,Git No Comments Yet

Moving from Google Code to GitHub

The protocol outlined below may appear complex, but it looks more
intimidating than it really is. Moving a project takes about two to five
minutes once your GitHub account and your migration computer is
properly configured.

You need four things to move a Google Code SVN project to GitHub:

  1. A Google Code project to move
  2. A GitHub user account
  3. SSH keys, and
  4. A migration computer that is configured to migrate the
    project from Google Code to GitHub. (in this tutorial, we will use a
    Ubuntu server; but any other Linux/Windows/Mac computer, properly
    configured, should do the job)

Read More...

Return Top