Wednesday, 21 October 2015

How to add git(bitbucket) to existing source code folder?

Create a project with some code:
$ mkdir project_name
$ cd project_name
$ echo "sample txt" > name of file to update
 
Inside the project's folder, do an initial commit:
$ git init
$ git add file_name or --all if all files
$ git commit -m "Initial commit"
 
and remote and push up

$ git remote add file_name  user@host:repo
$ git push filename or --all 
 
 

No comments:

Post a Comment