To Create git repository for your projects in your local network.
1- (Server) Go to the server machine.
2- (Server) Create a folder to be your repository. and move to the directory
$ mkdir louaiRepo
$ cd louaiRepo
3- (Server) Initialize the git repository using git command
$ git init
$ git config --bool core.bare true
4- (Your Local Machine) Move all your projects. inside this repository manually.
$ scp -r NetbeansProject louai@server:<dir>/louaiRepo/
5- (Server) add and commit using git
$ git add .
$ git commit -m "This is the first commit"
$ git push
6- (Your Local Machine) go to the directory that you wish to clone this repository, let's assume
$ cd~
$ git clone louai@server:<dir>/louaiRepo
7- (Local machine) now you can see the louaiRepo in the home directory.
1- (Server) Go to the server machine.
2- (Server) Create a folder to be your repository. and move to the directory
$ mkdir louaiRepo
$ cd louaiRepo
3- (Server) Initialize the git repository using git command
$ git init
$ git config --bool core.bare true
4- (Your Local Machine) Move all your projects. inside this repository manually.
$ scp -r NetbeansProject louai@server:<dir>/louaiRepo/
5- (Server) add and commit using git
$ git add .
$ git commit -m "This is the first commit"
$ git push
6- (Your Local Machine) go to the directory that you wish to clone this repository, let's assume
$ cd~
$ git clone louai@server:<dir>/louaiRepo
7- (Local machine) now you can see the louaiRepo in the home directory.
No comments:
Post a Comment