Skip to content

Instantly share code, notes, and snippets.

@jimoconnell
Last active December 25, 2015 05:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jimoconnell/6927194 to your computer and use it in GitHub Desktop.
Save jimoconnell/6927194 to your computer and use it in GitHub Desktop.
Test
We will create the remote repository first.
1
2
3
$ mkdir -p Projects/myeliteproject.git && cd Projects/myeliteproject.git
$ git init --bare
$ exit
We need the “—bare” flag. If you want to know why, read the manual and have in mind that this is a remote repository.
At this point we go on the desktop computer where the actual development will take place. I assume that you will use the same directory and project for the sake of coherence.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
$ mkdir -p Projects/myeliteproject.git && cd Projects/myeliteproject.git
$ git init
$ git remote add origin ssh://[user]@[hostname]/full/path/to/the/repo.git
$ git push origin master
$ echo "We need this commit in order to avoid errors" > first_commit.txt
$ git add first_commit.txt
$ git commit
(write a reason here... "first needed commit" is a good one)
$ git push
$ git config branch.master.merge 'refs/heads/master'
$ git config branch.master.remote origin
$ git config --global push.default current
(<em>This config is to avoid warning messages. Please read <a href="http://progit.org/book/ch9-5.html">here</a> and consult documentation for refspecs</em>)
$ git pull
Already up-to-date.
You should be able to see the “Already up-to-date” flag also. Now on how to proceed from here, read the git tutorial. Apart from gitweb there several others solutio
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment