LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-14-2017, 02:21 AM   #1
validator456
Member
 
Registered: Apr 2013
Location: Rotterdam, The Netherlands
Distribution: Crunchbang Linux
Posts: 234

Rep: Reputation: Disabled
Git add question


When I do git status, I get:

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

.vimrc
eml-to-pdf-converter/
googler/
qutebrowser/
vimrc-file/

nothing added to commit but untracked files present (use "git add" to track)
Are the files not recognized?
But when I do
Quote:
git fetch googler
I get an update.

How is this possible?

Btw, I know this is probably a newbie question, but I am a starter so I would appreciate it if you would help me out.
 
Old 08-14-2017, 02:41 AM   #2
validator456
Member
 
Registered: Apr 2013
Location: Rotterdam, The Netherlands
Distribution: Crunchbang Linux
Posts: 234

Original Poster
Rep: Reputation: Disabled
I think I have figured it out myself.
 
Old 08-14-2017, 08:12 AM   #3
jlinkels
LQ Guru
 
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195

Rep: Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043
@validator: it is good etiquette in this forum not just to write "I have figured it out" but also write how you did.
That might helpful to others and it is a small effort once you post you solved it anyway.

jlinkels
 
Old 08-15-2017, 12:48 AM   #4
validator456
Member
 
Registered: Apr 2013
Location: Rotterdam, The Netherlands
Distribution: Crunchbang Linux
Posts: 234

Original Poster
Rep: Reputation: Disabled
Thank you for your reply, jinkels.

I am a beginner and I make beginner mistakes. This is what I had done: I have a directory that contains my repositories. Somehow I couldn't upload to Github at the time and I decided to run the git init command to this very same folder.

When you then run git status, you get the above message. The folders are not added, but it didn't feel right to me.

So, how to run an un init command? The answer is simple: remove the .git file from the directory.
Quote:
rm -rf .git
And everything is as it should be.
 
Old 08-16-2017, 01:49 AM   #5
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6051Reputation: 6051Reputation: 6051Reputation: 6051Reputation: 6051Reputation: 6051Reputation: 6051Reputation: 6051Reputation: 6051Reputation: 6051Reputation: 6051
i use
Code:
git add .
or
git add *
or both, before commiting.
 
  


Reply

Tags
git


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Trying to add git... but am stuck 1/2 way... ArchieBa Linux - Newbie 6 10-19-2016 01:26 PM
Git/GitHub - How can I add a user's commit into local repo? Altiris Linux - Software 3 08-25-2015 01:49 AM
LXer: git commit -m 'Add $200m to GitHub, tweak valuation to $2bn' LXer Syndicated Linux News 0 06-17-2015 09:40 PM
files missing using git add command ansonc Linux - Newbie 2 04-19-2015 09:15 PM
[SOLVED] Can't install Git repo (I don't git git ) Nemus Linux - Software 3 05-20-2011 02:09 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:26 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration