GIT Starting a new repo or project

Posted under » Version Control on 23 Aug 2018

You must install git first.

Create a directory and cd inside the directory.

git init

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

$ git config --global user.name "Hanafi"
$ git config --global user.email lkyb@anoneh.com

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

$ git add .

Suppose you want to add only new files.

svn status | grep '?' | sed 's/^.* /svn add /' | bash

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.

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