64

This was my day at work today
-Be me at work
-Use git terminal on WORK PROVIDED MacBook
-Decide to clone into a repo into another repo as it was one project inside another project
-Makes changes to code
-Attempts to add .
- warning: adding embedded git repo ...
-Apparently needs submodules
-Shit doesn't get added
-During this get asked to create 2 new branches and modify some code
-Do that specifying files to add as add . breaks everything
-Has 3 branches now detached from master
-Super confused where anything is and what's going on
-Go back to branch for other repo to get added to
-Spends 30 minutes trying to understand submodules
-Gives up and deletes folder moving it elsewhere
-Commits begin failing everywhere. Super confused.
-Get everything figured out and commiting
-Goto merge all branches to master
-Merge conflict with .DS_Store
-FML

I think I'm done guys

Comments
  • 5
    Thanks :P @Floydian
  • 2
    Do you have a .gitignore?
  • 4
    @electrineer Yea, still picking up how all of it works. My best plan of action was just to keep the two repos separate since it seemed to be too much work to combine then and it wasn't worth learning how gitignores work for 2 adds
  • 5
    @andpeterson It would have been worth learning before somebody went and added .DS_Store :P
  • 4
    @electrineer Somewhere along the line the .DS_Store got changed by the system as I was the only one making changes to the repo at the moment. Will for sure look into learning in the future though! Just didn't have the time today to deal with it
  • 1
    Don't use "git add ."
    I know it's easier, but it's better to be explicit about which files to commit.
    And don't commit things that aren't part of the project. IDE files shouldn't be committed, for example.

    Don't give up. Everyone messes up at first.
  • 1
    @shellbug better than specifying which files to add, use -p/--patch to specify which hunks and even modify them interactively
  • 0
    @fdgram yes, that's even better but maybe a bit too much for a beginner.
  • 1
    oh does fucking .DS_Store files haha
  • 0
    You will learn in time. Don’t feel bad using the git gui til you get used to the process and then ween off it to using the cli
  • 0
    I fucking hate .DS_STORE files. Fucking Apple, man; always ruining a good thing.
  • 3
    @RiderExMachina I'm enjoying the Linux terminal. One of the few upsides to using a Mac over windows PC
Add Comment