Jump to content


Photo

Git: Staging All Untracked And Modified Files


  • Please log in to reply
13 replies to this topic

#1 big dave

big dave

    Invested Member

  • Members
  • PipPipPip
  • 874 posts
  • Gender:Male
  • Location:Los Angeles
  • Languages:JavaScript & PHP

Posted 03 November 2011 - 06:08 AM

Is there a way to stage all untracked and modified files using Git? I cant seem to find this anywhere. I know that if you do:
git .
it stages the entire folder I can stage each one individually but it is kind of a pain when the files are in different folders.

#2 thescientist

thescientist

    Keepin' it reel

  • Moderator
  • PipPipPipPipPipPipPip
  • 8,667 posts
  • Gender:Male
  • Location:Rhode Island, USA
  • Interests:Music, programming, computers, web design, business, books, and politics.
  • Languages:HTML/CSS/JS, PHP/MySQL, bash, VCS, OSS, Java, Python

Posted 03 November 2011 - 07:10 PM

I know it's covered in this presentationhttp://yuilibrary.co...t2011-donnelly/ and I told myself to remember it because I want to do it all the time, but I haven't gotten a chance to go back and see it again. or it might be a way to commit/push in one fell swoop, but I think your answer is in there.

myTunes: www.analogstudios.net

my {...} code {...} works in all the decent browsers. This of course means that it does not work in IE.


#3 big dave

big dave

    Invested Member

  • Members
  • PipPipPip
  • 874 posts
  • Gender:Male
  • Location:Los Angeles
  • Languages:JavaScript & PHP

Posted 04 November 2011 - 01:48 AM

So I think the command is just:
git add .
Sound about right? I tried it and it looks like it staged just the files I modified or newly created files.

#4 boen_robot

boen_robot

    XSLT senior

  • Moderator
  • PipPipPipPipPipPipPip
  • 8,486 posts
  • Gender:Male
  • Location:europe://Bulgaria/Plovdiv
  • Interests:Everything having to do with computers... and science.
  • Languages:(X)HTML, CSS, XML, XSLT, Schema, PHP, JavaScript (a little), other XML based...

Posted 05 November 2011 - 11:02 PM

Just curious... have you considered using a GUI tool like TortoiseGit for example? Things like that are a check box away there.
The greatest difficulty in programming is not in finding answers, but in asking yourself the right questions. -- If nobody has said it before, then I'd like to take credit of thinking this up (during summer of 2010).
"Complex problems often have the simplest solutions" -- Not sure who said that first.
=== My projects (all feedback welcomed) ===
XML_XSLT2Processor(0.5.3) - perform XSLT 2.0 transformations in PHP.
PEAR2_Net_Transmitter(1.0.0a4) - reliable sockets.
PEAR2_Cache_SHM(0.1.2) - persistent data storage wrapper.
=== Useful tools ===
NetBeans - full featured PHP IDE, as well as a decent code editor for other things.
Fiddler2 - The best free HTTP debugger. Performance tuning, security check, integrity check, custom requests and more, all made easy.
Gobby - That's NOT my Nickname! Look at the topic.

#5 big dave

big dave

    Invested Member

  • Members
  • PipPipPip
  • 874 posts
  • Gender:Male
  • Location:Los Angeles
  • Languages:JavaScript & PHP

Posted 05 November 2011 - 11:09 PM

Woa, I havent heard of this. I have a mac and after you get used to the terminal, it's not all that hard to use. Looks like this is only for PC, which I may use whenever I'm on a PC. I've tried Tower before I was familiar with the terminal and I thought it was pretty good. Except you have to pay for it so I just went with learning the commands, which is probably a more valuable skill to have anyways.

#6 boen_robot

boen_robot

    XSLT senior

  • Moderator
  • PipPipPipPipPipPipPip
  • 8,486 posts
  • Gender:Male
  • Location:europe://Bulgaria/Plovdiv
  • Interests:Everything having to do with computers... and science.
  • Languages:(X)HTML, CSS, XML, XSLT, Schema, PHP, JavaScript (a little), other XML based...

Posted 05 November 2011 - 11:18 PM

I just noticed this... I didn't even know GitHub made ANY clients.
The greatest difficulty in programming is not in finding answers, but in asking yourself the right questions. -- If nobody has said it before, then I'd like to take credit of thinking this up (during summer of 2010).
"Complex problems often have the simplest solutions" -- Not sure who said that first.
=== My projects (all feedback welcomed) ===
XML_XSLT2Processor(0.5.3) - perform XSLT 2.0 transformations in PHP.
PEAR2_Net_Transmitter(1.0.0a4) - reliable sockets.
PEAR2_Cache_SHM(0.1.2) - persistent data storage wrapper.
=== Useful tools ===
NetBeans - full featured PHP IDE, as well as a decent code editor for other things.
Fiddler2 - The best free HTTP debugger. Performance tuning, security check, integrity check, custom requests and more, all made easy.
Gobby - That's NOT my Nickname! Look at the topic.

#7 big dave

big dave

    Invested Member

  • Members
  • PipPipPip
  • 874 posts
  • Gender:Male
  • Location:Los Angeles
  • Languages:JavaScript & PHP

Posted 06 November 2011 - 09:16 AM

interesting! Im downloading it now. Might be a nice visual way to interact with GitHub. Thanks for sharing

#8 big dave

big dave

    Invested Member

  • Members
  • PipPipPip
  • 874 posts
  • Gender:Male
  • Location:Los Angeles
  • Languages:JavaScript & PHP

Posted 07 November 2011 - 12:05 AM

It is a nice way to interact with GitHub, but it isnt a GUI for just using Git. Still, very useful since sometimes its hard to remember the commands for pushing to GitHub like "git push origin master"

#9 Synook

Synook

    53 79 6E 6F 6F 6B 0D 0A

  • Moderator
  • PipPipPipPipPipPipPip
  • 7,419 posts
  • Gender:Male
  • Location:Australia
  • Interests:Web development, Computer Science, and the pursuit of knowledge in general.
  • Languages:(X)(HT)ML, CSS, PHP, SQL, JavaScript, Java, Python

Posted 07 November 2011 - 12:35 AM

The GitHub for Mac documentation says you can use it for any Git repository: "... if you wish to use a non-GitHub remote, it will work just fine. Set the remote manually in the settings tab and everything else should work as expected."

#10 thescientist

thescientist

    Keepin' it reel

  • Moderator
  • PipPipPipPipPipPipPip
  • 8,667 posts
  • Gender:Male
  • Location:Rhode Island, USA
  • Interests:Music, programming, computers, web design, business, books, and politics.
  • Languages:HTML/CSS/JS, PHP/MySQL, bash, VCS, OSS, Java, Python

Posted 07 November 2011 - 07:28 PM

Woa, I havent heard of this. I have a mac and after you get used to the terminal, it's not all that hard to use. Looks like this is only for PC, which I may use whenever I'm on a PC. I've tried Tower before I was familiar with the terminal and I thought it was pretty good. Except you have to pay for it so I just went with learning the commands, which is probably a more valuable skill to have anyways.

http://gitx.frim.nl/

myTunes: www.analogstudios.net

my {...} code {...} works in all the decent browsers. This of course means that it does not work in IE.


#11 Fmdpa

Fmdpa

    Dedicated Member

  • Members
  • PipPipPipPip
  • 1,035 posts
  • Gender:Male
  • Location:United States
  • Languages:HTML, CSS, PHP, SQL, JS

Posted 12 November 2011 - 02:11 AM

Actually, when I installed git (from, I believe, here: http://git-scm.com/), it came with a a program called Git GUI which is surprisingly good. If you want an excellent free reference, there is link to a PDF here: http://w3schools.inv...ndpost&p=221950 The Tower client looks pretty sweet, but its mac-only and not free. Come on, shouldn't you have a free GUI for a free, open source VCS?

What I like about computers: ctrl+z

Netbeans IDE Dark Twilight Theme for Netbeans

CyberStream - my photography and web development blog


#12 big dave

big dave

    Invested Member

  • Members
  • PipPipPip
  • 874 posts
  • Gender:Male
  • Location:Los Angeles
  • Languages:JavaScript & PHP

Posted 12 November 2011 - 02:32 AM

Thanks for the resources! I actually just installed Git on my work computer (a PC) and I noticed there was a Git GUI program along with Git Bash. I just used Git Bash since I am familiar with the terminal commands but maybe I should give the GUI version a shot. How do you like it? Easy to use? I guess for macs we're just left w the command line, which is fine i guess but it was a bit to learn when i first started. Thankfully, im over that hump now.

#13 Fmdpa

Fmdpa

    Dedicated Member

  • Members
  • PipPipPipPip
  • 1,035 posts
  • Gender:Male
  • Location:United States
  • Languages:HTML, CSS, PHP, SQL, JS

Posted 16 November 2011 - 04:03 AM

The Git GUI really simplifies a lot of things. I stumbled through using the Git Bash, and it was a tremendous learning experience. But I still prefer GUI tools over it at this point, for the more complex procedures.

What I like about computers: ctrl+z

Netbeans IDE Dark Twilight Theme for Netbeans

CyberStream - my photography and web development blog


#14 thescientist

thescientist

    Keepin' it reel

  • Moderator
  • PipPipPipPipPipPipPip
  • 8,667 posts
  • Gender:Male
  • Location:Rhode Island, USA
  • Interests:Music, programming, computers, web design, business, books, and politics.
  • Languages:HTML/CSS/JS, PHP/MySQL, bash, VCS, OSS, Java, Python

Posted 03 February 2017 - 07:17 PM

If you are on a linux machine, you can probably just use find


myTunes: www.analogstudios.net

my {...} code {...} works in all the decent browsers. This of course means that it does not work in IE.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users