YoniGeek
YoniGeek

Reputation: 4093

GIT wants to keep track of my files in my USER-account, everytime I want to work with a single file

I've a txt-file in a /directoryfolder:

~/hej/git_testing(master ✗) git status inside I've: a file.txt

Now when I want to know the status of this file : git status. I get this (see below)

It seems like I'm adding/committing the whole USER-name -account?

How can I reverse this problem? I just want to know the status of a single file within a specific folder/directory..

# On branch master
# Changes not staged for commit:
#   (use "git add/rm <file>..." to update what will be committed)
#   (use "git checkout -- <file>..." to discard changes in working directory)
#
#   deleted:    ../../Documents/tutsTutorials/ruby/tealeaf/w_development/tl-blackjack-webapp/.DS_Store
#   deleted:    ../../Documents/tutsTutorials/ruby/tealeaf/w_development/tl-blackjack-webapp/.idea/.name
#   deleted:    ../../Documents/tutsTutorials/ruby/tealeaf/w_development/tl-blackjack-webapp/.idea/encodings.xml
#   deleted:    ../../Documents/tutsTutorials/ruby/tealeaf/w_development/tl-blackjack-webapp/.idea/misc.xml
#   deleted:    ../../Documents/tutsTutorials/ruby/tealeaf/w_development/tl-blackjack-webapp/.idea/modules.xml
#   deleted:    ../../Documents/tutsTutorials/ruby/tealeaf/w_development/tl-blackjack-webapp/.idea/scopes/scope_settings.xml
#   deleted:    ../../Documents/tutsTutorials/ruby/tealeaf/w_development/tl-blackjack-webapp/.idea/tl-blackjack-webapp.iml
#   deleted:    ../../Documents/tutsTutorials/ruby/tealeaf/w_development/tl-blackjack-webapp/.idea/vcs.xml
#   deleted:    ../../Documents/tutsTutorials/ruby/tealeaf/w_development/tl-blackjack-webapp/.idea/workspace.xml
#   deleted:    ../../Documents/tutsTutorials/ruby/tealeaf/w_development/tl-blackjack-webapp/Gemfile
#   deleted:    ../../Documents/tutsTutorials/ruby/tealeaf/w_development/tl-blackjack-webapp/Gemfile.lock
#   deleted:    ../../Documents/tutsTutorials/ruby/tealeaf/w_development/tl-blackjack-webapp/README
#   deleted:    ../../Documents/tutsTutorials/ruby/tealeaf/w_development/tl-blackjack-webapp/config.ru
#   deleted:    ../.. 

and keep going.....

and then

Untracked files:
#   (use "git add <file>..." to include in what will be committed)
#
#   ../../.CFUserTextEncoding
#   ../../.Trash/
#   ../../.Xauthority
#   ../../.adobe/
#   ../../.bash_history
#   ../../.bash_login.swp
#   ../../.bash_profile
#   ../../.bashrc
#   ../../.codeintel/
#   ../../.config/
#   ../../.crash_report_checksum
#   ../../.crash_report_frames
#   ../../.crash_report_preview
#   ../../.dbshell
#   ../../.dropbox/
#   ../../.filezilla/
#   ../../.fontconfig/
#   ../../.gem/
#   ../../.gitconfig
#   ../../.gitignore
#   ../../.gitk
#   ../../.heroku/
#   ../../.ievms/
#   ../../.irb-history
#   ../../.irb_history
#   ../../.lesshst
#   ../../.local/
#   ../../.mongorc.js
#   ../../.mysql_history
#   ../../.nchsoftware/
#   ../../.netrc
#   ../../.npm/

and keep going.....

no changes added to commit (use "git add" and/or "git commit -a") ~/hej/git_testing(master ✗)

Upvotes: 0

Views: 74

Answers (2)

Bijendra
Bijendra

Reputation: 10053

The git has been initialized accidentally on the entire home folder which has resulted in tracking of all the files. It should be initialized inside a /directoryfolder which contains the txt-file

Remove the .git folder from home directory as it will create confusion and conflict.

Upvotes: 1

aragaer
aragaer

Reputation: 17858

You have created git repository in your home directory. Simply delete ~/.git

Upvotes: 1

Related Questions