Reputation: 231
I am new to Github and want to setup a account for my project that I will be writing it in Ruby on Rails. I am using Virtual Box and set my VM OS on Ubuntu. I have created a Github account and a new Repo for my project test. These are the steps I went through so far:
cd test
git config --global user.name ’My Name’
git config --global user.email ’Myemailaddress’
git init
touch README
add README
git remote add origin [email protected]:myusername/myreponame.git
git push origin master
till these steps everything is fine and then I created my app with
rails new test -T
Now after this step I am really not sure what to do next. Should I add all my files and directories to Github Repo or only those that I am going to modify. And what is the git syntax to add all files and directories together? How to commit and save the commit? I really appreciate any suggestion...
Upvotes: 2
Views: 2480
Reputation: 2481
just do it in your terminal/comment prompt
~/.ssh
ls
ssh-keygen -t rsa -C "your register mail-id"
ls
vim id_rsa.pub
copy the manually keys 4 line and paste it in git Account settings--> ssh key--> add key
git config --global user.name "your register Name"
git config --global user.email "your register mail-id"
mkdir ~/YourFolderName
cd ~/YourFolderName
git init
select your user name in that you created repository
from that select currently upload repository and
select from [email protected]:registerName/ repository_name.git
git clone [email protected]:registerName/repository_name.git
git add *
cd repository_name
git add *
git commit -m "repository_name"
git push origin master
cd
cd ~/.ssh
Upvotes: 2
Reputation: 8513
Now, import your project into GIT, like so:
git add .
git commit
http://www.manniwood.com/starting_a_project_with_git.html
You may want to push your commits to github as well:
git push
But, as noted above, you're better off getting through a tutorial: in order to be able to benefit from git, you need to understand what you're doing, and simple answers like "do X" are not of much help here.
My favourite is Pro Git— you'll need to work through it from start to 2.5 Git Basics - Working with Remotes at least.
Upvotes: 2