GIT Starting a new repo or project

Posted under » Version Control on 23 Aug 2018

You must install git first but if you are running Ubuntu server GIT is already pre-installed. To be sure check it out by

git --version

Create a directory and cd inside the directory.

git init

Since Git is about working with other people, create your profile.

$ git config --global "Hanafi"
$ git config --global

Next, tell Git to take a snapshot of the contents of all files under the current directory (note the .), with git add:

$ git add .

This snapshot is now stored in a temporary staging area which Git calls the "index". You can permanently store the contents of the index in the repository with git commit.

$ git commit

This will prompt you for a commit message. Press ^s to save and then exit. You’ve now stored the first version of your project in Git. However, if you prefer to use Vim instead of nano editor.

$ git config --global core.editor vim

Just like SVN you can do this when commiting.

$ git commit -m "this is my commit message"

» next

web security linux ubuntu GIT svn Raspberry apache mysql php drupal cake symfony javascript Ajax css