2015年3月17日 星期二

Ubuntu設定GIT Server

  1. sudo apt-get install git
    


可能還要用, 但是沒用

How to Setup Git


After Git is installed, whether from apt-get or from the source, you need to copy your username and email in the gitconfig file. You can access this file at ~/.gitconfig. 

Opening it following a fresh Git install would reveal a completely blank page:
sudo nano ~/.gitconfig

You can use the follow commands to add in the required information.
git config --global user.name "NewUser"
git config --global user.email newuser@example.com

You can see all of your settings with this command:
git config --list

If you avoid putting in your username and email, git will later attempt to fill it in for you, and you may end up with a message like this:
[master 0d9d21d] initial project version
 Committer: root 
Your name and email address were configured automatically based
on your username and hostname. Please check that they are accurate.
You can suppress this message by setting them explicitly:

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

After doing this, you may fix the identity used for this commit with:

    git commit --amend --reset-author

沒有留言: