• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

GitHub/Fork/Local Git/Getting Giddified ...

Scheduled Pinned Locked Moved General Discussion
7 Posts 2 Posters 3.7k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    KirAsh4 Moderator
    last edited by May 8, 2016, 7:40 AM

    Ok, someone with a way better understanding of GitHub/Git, please chime in here. Be warned, this is convoluted:

    • I have a fork of the main project (/MichMich/MagicMirror) on GitHub
    • From my PC, I pulled it down with GitHub and saved it onto a folder that’s shared FROM the rPi’s pi user account (where MM lives and runs from)
    • I edit on my PC, refresh MM from the rPi and when satisfied, push changes back into my fork of the project (see below why)
    • Every so often I will pull the upstream branch down and merge it with my own so I keep synced with the main project

    I also pull the same fork down at work, same setup, from a PC running GitHub, onto a shared folder running on a unix machine. I run MM from that unix machine, make edits on my PC, and when satisfied, push them back up to my fork. This also means that every day I resync my systems from my fork. If I make changes while at the office, I resync when I get home so my computer at home has those changes. When I get to the office in the morning, I resync so I get all the changes I made at home. I told you it’s convoluted, didn’t I?

    This works … except, when I create a pull-request, it pulls in every-little-detail. Like, each time I (re)synced with the main branch. Local .gitattributes file that I created and synced back up to my own fork. Here’s is an example of what it’s doing:
    0_1462692624432_gitsample.png

    Note the upstream merge commits, and the .gitattributes file create and delete … those are all being reported in the pull request. As well as some random filemode changes.

    So, without me losing my head completely, is there a better way to do a pull request where all of that extraneous crap isn’t there?

    A Life? Cool! Where can I download one of those from?

    M 1 Reply Last reply May 8, 2016, 7:58 PM Reply Quote 0
    • M Offline
      MichMich Admin @KirAsh4
      last edited by May 8, 2016, 7:58 PM

      @KirAsh4 cant help you here. Git is one of those guys I don’t dare to ask difficult questions. Always afraid that it will beat me up. 😂

      1 Reply Last reply Reply Quote 1
      • K Offline
        KirAsh4 Moderator
        last edited by May 8, 2016, 8:37 PM

        Bwahahaha. Yeah, I think I’m going to have to ask the git community or on stackoverflow.

        A Life? Cool! Where can I download one of those from?

        1 Reply Last reply Reply Quote 0
        • K Offline
          KirAsh4 Moderator
          last edited by May 10, 2016, 8:00 AM

          So the short answer is to squash my commits prior to syncing to GitHub. Easy enough … I have to remember to do it and only sync once per session, so like at the end of my work day, or at the end of the evening at home. That should then create a cleaner PR. This is to be tested next … after I get rid of the current fork that I have that has dozens of commits on a PR (because I synced dozens of times.) Get rid of it, refork, add my stuff back in, and then get a clean(er) PR done. Oy … headache.

          A Life? Cool! Where can I download one of those from?

          M 1 Reply Last reply May 10, 2016, 8:03 AM Reply Quote 0
          • M Offline
            MichMich Admin @KirAsh4
            last edited by May 10, 2016, 8:03 AM

            @KirAsh4 Do you do your Git work via the command line or are you using an GUI? I admit to use Tower for the more advanced work, and it really makes stuff more easy.

            1 Reply Last reply Reply Quote 0
            • K Offline
              KirAsh4 Moderator
              last edited by May 10, 2016, 8:08 AM

              Mainly GitHub for Windows (which is a GUI). And it’s really only for committing my changes, and syncing them back up to GitHub (online, into my fork). The only time I drop to command line is when I need to merge the upstream repo (so I stay current with stuff that you merge in.)

              But the problem is that I have a tendency to push stuff up to GitHub (online) several times during the day, as opposed to just once at the end of the day. This then creates multiple commits in the PR. If I squash all of my commits into one, just prior to syncing, then the PR will only have 1 or 2 items in it, as opposed to one for every single commit I made throughout the day.

              It’s a matter of changing how I interact with GitHub, which I suspect would be the same no matter what application I’m using.

              A Life? Cool! Where can I download one of those from?

              M 1 Reply Last reply May 10, 2016, 8:09 AM Reply Quote 0
              • M Offline
                MichMich Admin @KirAsh4
                last edited by May 10, 2016, 8:09 AM

                @KirAsh4 Thats true indeed. I just admit. I work the same way as you: push every change! ;)

                1 Reply Last reply Reply Quote 0
                • 1 / 1
                1 / 1
                • First post
                  1/7
                  Last post
                Enjoying MagicMirror? Please consider a donation!
                MagicMirror created by Michael Teeuw.
                Forum managed by Sam, technical setup by Karsten.
                This forum is using NodeBB as its core | Contributors
                Contact | Privacy Policy