can't git add . files, how do i git add , the right way?

84 views Asked by At

Hi I am new on ruby on rails, I am creating an app with the ruby on rails version 3. I am having trouble, I have a lot of files to add. I type command git status and the following comes up , then I typed git add . and nothing happens. What am I missing?

$ git status

On branch master Untracked files: (use "git add ..." to include in what will be committed)

.CFUserTextEncoding
.DS_Store
.bash_history
.bash_profile
.bash_sessions/
.bashrc
.bundle/
.cache/
.config/
.gem/
.gitconfig
.heroku/
.local/
.mkshrc
.mplayer/
.netrc
.node-gyp/
.npm/
.oracle_jre_usage/
.profile
.rvm/
.ssh/
.subversion/
.viminfo
.zlogin
.zshrc
Applications/
Desktop/
Documents/
Downloads/
FrostWire/
Library/
Movies/
Music/
Pictures/
Public/
RubymineProjects/
homebrew/
keys.txt
workspace/
2

There are 2 answers

3
puneet18 On

check list of remotes using

git remote 

Install git-cola UI use for stage/unstage and commit files easily. You can also easily see the changes made in files.

In ubuntu:

sudo apt-get install git-cola

Move to your app directory and write command

cola

It will display all changes in file. Stage it and commit it.

0
zeekhuge On

Looks like you have initialized your home directory as a git repo.

If you are very new to git, I would recommend you to install a Gui client to use git. There are many of them, just google it.

If you still want to use the terminal approach, read on:

Follow these steps

  • first, use the cd command to navigate to the your project folder, like :

    $ cd ~/path/to/the/your/project
    
  • then, use git status to see if your project folder is already a git repo. If not, use git init to make your project a git repo.

  • further then you can add all your project files normally using git add --all ./ (if you what to add them all)