I need help with github

BBmine
Member
 
Posts: 1425
Joined: Sun Jul 12, 2015 22:51
GitHub: BBmine
IRC: BBmine
In-game: Baggins

I need help with github

by BBmine » Thu Jan 26, 2017 03:28

Hello, here's the problem: Due to a messup in a commit, something (either github or my local copy) thinks that the files I want to push to github are already there, even though they're just on the local copy. This is the repo in question: https://github.com/BBmine/noob_academy.

I'm kind of a noob at github, so please tell me how to do what I need to do.
God's not dead!
I actually did mine walls before I started playing this game....
Mods, Servers, and My Youtube Channel
Let us remember Just Test on April 16.
"Together, we will make America great again!" --President Trump
Please vote for the next video I should do here
I'm the most rottenist potato in the fridge.
Copyright (c) 2017 Baggins Inc. (tm) All rights reserved.
 

User avatar
octacian
Member
 
Posts: 408
Joined: Mon Dec 21, 2015 22:18
GitHub: octacian
IRC: octacian
In-game: octacian

Re: I need help with github

by octacian » Thu Jan 26, 2017 05:06

If I understand correctly, you're saying that GitHub won't accept the commit(s) that you are trying to push because it thinks they are already there? If so, do:

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
git push origin +master


(Where origin is the name of the remote)

Essentially, the above forces the commit(s) to be pushed no matter what. Hope that helps!
God isn't dead!

My Coolest Mods:
MicroExpansion, Working Computers, Interchangeable Hands

Check out my YouTube channel! (octacian)
 

User avatar
kaeza
Member
 
Posts: 2141
Joined: Thu Oct 18, 2012 05:00
GitHub: kaeza
IRC: kaeza diemartin blaaaaargh
In-game: kaeza

Re: I need help with github

by kaeza » Thu Jan 26, 2017 06:24

Force-pushing to a repo should only be used if strictly necessary as you may break stuff.

BBmine: Can you say which steps are you performing, and any actual error messages you get? Don't paraphrase. Either copy/paste or take a screenshot.
Your signature is not the place for a blog post. Please keep it as concise as possible. Thank you!

Check out my stuff! | Donations greatly appreciated! PayPal | BTC: 1DFZAa5VtNG7Levux4oP6BuUzr1e83pJK2
 

BBmine
Member
 
Posts: 1425
Joined: Sun Jul 12, 2015 22:51
GitHub: BBmine
IRC: BBmine
In-game: Baggins

Re: I need help with github

by BBmine » Thu Jan 26, 2017 14:06

cd git_repo
git add --all
git commit -m "message"
"nothing to commit, working tree clean"
git push --all
"Everything up-to-date"
ls
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
3d_armor                 farming             na
admin_tools              fire                nametag_color
advtrains                frisk               otherblocks_2016_03_17
afkkick                  give_initial_stuff  pathv6alt
alias                    homedecor_modpack   playertools
banner                   inventory_plus      protector
basic_machines           jdukebox            signs_lib
bedrock2                 kpgmobs             simple_skins
bees                     lantern             smartshop
bmail                    letters             spawn
bones                    mail                teleports
bridgetool               mapfix              timer_shutdown
carbone_torches          mese_crystals       tools_obsidian
cblocks                  meseingravel        travelnet
chat2                    mobs                tsm_mines
chat_anticurse           mobs_water-master   tutor
cottages                 moreblocks          Uberi-Minetest-WorldEdit-44c9576
datastorage              mr_goat             unified_inventory
destinations_2015_04_02  myadmin             viaduct
external_cmd             mydeck              vines

On https://github.com/bbmine/noob_academy. Notice the images for the folders "advtrains" and "letters". Also, those aren't really folders. The local repo actually has stuff in the folders.
God's not dead!
I actually did mine walls before I started playing this game....
Mods, Servers, and My Youtube Channel
Let us remember Just Test on April 16.
"Together, we will make America great again!" --President Trump
Please vote for the next video I should do here
I'm the most rottenist potato in the fridge.
Copyright (c) 2017 Baggins Inc. (tm) All rights reserved.
 

Morn76
Member
 
Posts: 640
Joined: Sun Feb 16, 2014 19:45
GitHub: mdoege

Re: I need help with github

by Morn76 » Thu Jan 26, 2017 14:26

BBmine wrote:On https://github.com/bbmine/noob_academy. Notice the images for the folders "advtrains" and "letters". Also, those aren't really folders. The local repo actually has stuff in the folders.

Make sure those subfolders are not git repos themselves. If they are, then run "rm -fr .git" inside them to turn them into regular folders.
 

BBmine
Member
 
Posts: 1425
Joined: Sun Jul 12, 2015 22:51
GitHub: BBmine
IRC: BBmine
In-game: Baggins

Re: I need help with github

by BBmine » Thu Jan 26, 2017 14:35

Morn76 wrote:
BBmine wrote:On https://github.com/bbmine/noob_academy. Notice the images for the folders "advtrains" and "letters". Also, those aren't really folders. The local repo actually has stuff in the folders.

Make sure those subfolders are not git repos themselves. If they are, then run "rm -fr .git" inside them to turn them into regular folders.

Um, they are git repos. Okay, if they can't be git repos, then how do I make sure the most up-to-date stuff is being pushed?
God's not dead!
I actually did mine walls before I started playing this game....
Mods, Servers, and My Youtube Channel
Let us remember Just Test on April 16.
"Together, we will make America great again!" --President Trump
Please vote for the next video I should do here
I'm the most rottenist potato in the fridge.
Copyright (c) 2017 Baggins Inc. (tm) All rights reserved.
 

Morn76
Member
 
Posts: 640
Joined: Sun Feb 16, 2014 19:45
GitHub: mdoege

Re: I need help with github

by Morn76 » Thu Jan 26, 2017 14:44

BBmine wrote:Um, they are git repos. Okay, if they can't be git repos, then how do I make sure the most up-to-date stuff is being pushed?

You can use git submodules to create a link from your repository to either the latest versions or a specific commit of those mods.

But personally I've never done that; I always convert a mod to a regular folder, effectively forking it, so I can't tell you much more about how submodules work exactly.
 

BBmine
Member
 
Posts: 1425
Joined: Sun Jul 12, 2015 22:51
GitHub: BBmine
IRC: BBmine
In-game: Baggins

Re: I need help with github

by BBmine » Thu Jan 26, 2017 17:37

Morn76 wrote:
BBmine wrote:Um, they are git repos. Okay, if they can't be git repos, then how do I make sure the most up-to-date stuff is being pushed?

You can use git submodules to create a link from your repository to either the latest versions or a specific commit of those mods.

But personally I've never done that; I always convert a mod to a regular folder, effectively forking it, so I can't tell you much more about how submodules work exactly.

I could make a folder called noob_academy_repos and pull --all the mods in that folder. Also in that script, I could have
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
rsync -truv --delete --exclude=".*/" noob_academy_repos/ noob_academy/
God's not dead!
I actually did mine walls before I started playing this game....
Mods, Servers, and My Youtube Channel
Let us remember Just Test on April 16.
"Together, we will make America great again!" --President Trump
Please vote for the next video I should do here
I'm the most rottenist potato in the fridge.
Copyright (c) 2017 Baggins Inc. (tm) All rights reserved.
 


Return to Minetest General

Who is online

Users browsing this forum: No registered users and 17 guests

cron