git grrrrrrrrrr

User avatar
TumeniNodes
Member
 
Posts: 1335
Joined: Fri Feb 26, 2016 19:49
GitHub: TumeniNodes

git grrrrrrrrrr

by TumeniNodes » Sat Apr 16, 2016 14:37

How do I add a folder to my git repo?
Is it really so difficult for git to add a simple "add new folder" feature? I mean come on..., really?
They have "add file", but can't add a simple "add folder" feature as well
So, I need help to add the textures folders to my mod, because I just spent about 15 min following a few link which each had multiple answers, non of which were in layman's terms and even trying to follow the directions did not work.
It drives me nuts when someone not experienced asks a programmer, "how can I do this?" answer "Is simple <line code fill>, or something yet they give no other explanation... so their answer is useless and helps no one, and then they feel all pumped up and brilliant because they know what they mean.... grrrrrrrrrrr.
It's completely obnoxious and annoying
Flick?... Flick who?
 

User avatar
qwertymine3
Member
 
Posts: 194
Joined: Wed Jun 03, 2015 14:33
GitHub: Qwertymine
In-game: qwertymine3

Re: git grrrrrrrrrr

by qwertymine3 » Sat Apr 16, 2016 14:52

Are you trying to add an empty folder?
Git does not allow empty folders to be a part of the file tree which it tracks.

If you have files in that folder just 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 add <folder_name> # Add all files in that folder
# or
git add <folder_name>/<file_name> # Add one file from that folder


If you create more files, you will have to add them individually, or add the folder again as above.
Avatar by :devnko-ennekappao:
 

User avatar
TumeniNodes
Member
 
Posts: 1335
Joined: Fri Feb 26, 2016 19:49
GitHub: TumeniNodes

Re: git grrrrrrrrrr

by TumeniNodes » Sat Apr 16, 2016 15:03

I thank you for the help.
No, the folders I am trying to add hold all the image.png files. But, everytime I try to drag and drop the folders over it says the folder is empty.
Saying: git add <folder_name> # Add all files in that folder
# or
git add <folder_name>/<file_name> # Add one file from that folder makes no sense to me because it does not tell me "where" to put that code. I could go outside and spray paint it on my driveway and will not get me any further.
I am not saying that to sound rude nor ungrateful. I am simply stating that while giving the code is very nice, it does no good without further explanation as to "where" to put it. That is the same answer I found following several links and explanations with no further info
Flick?... Flick who?
 

Dragonop
Member
 
Posts: 1178
Joined: Tue Oct 23, 2012 12:59
GitHub: Dragonop
IRC: Dragonop
In-game: Dragonop

Re: git grrrrrrrrrr

by Dragonop » Sat Apr 16, 2016 15:21

A simple but hackish way to do this is (assuming you want to do it all from your browser):

-Click "New file"
-In the filename, put the name of the folder and then a /, then put something like test.txt (example: /textures/test.txt)
-Commit.
-This will create a new folder with an empty file, drag and drop all the files you want in the folder now.
-Delete test.txt.

Some people will hate me for suggesting this dumb thing but I hope it helps :P
 

User avatar
TumeniNodes
Member
 
Posts: 1335
Joined: Fri Feb 26, 2016 19:49
GitHub: TumeniNodes

Re: git grrrrrrrrrr

by TumeniNodes » Sat Apr 16, 2016 15:36

well it's definitely not dumb if it works and presents a clear and easy way for new users to know how to do it.
Thank you.
And I hope Qwerty does not fell I was being rude as was not my intention, I am very grateful for the help offered, my limited experience is the problem.
Dragon used layman's terms/explanation which helps it all make sense to me now.
The fact that my textures folder holds image files and not a code or txt file is why it is being read as empty. This now makes sense to me.
But, at the same time..., if I can do it the way he suggests, then go in and delete that empty txt file and then upload the image files... why then are the image files not considered or read by git as files in the first place? That part makes zero sense
Flick?... Flick who?
 

User avatar
rubenwardy
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Re: git grrrrrrrrrr

by rubenwardy » Sat Apr 16, 2016 15:42

How are you doing this all? Is this using github's web interface? Github is not git. Github is a website that hosts git projects (aka repos) on a server.

Git is a program which is used to control changes to files, and allow you to see history.

Whilst you can use Github online to make changes, it's not the "right" way

The two main ways of using git is

1. With a command line. That's what the git add etc is referring to, it's what you type into a command line. If on Windows, get "Git Shell". If on Debian/Ubuntu, type sudo apt-get install git-core. You'll need to set up your email and name. Use the same email as you do for Github. Note that the email you use is visible by anyone that can see the commit logs (for example, it would be publicly visible if you host the repo on github publicly)

2. With a desktop program, for example "Github for Windows". This allows you to graphically add files and make changes.

Folders don't exist in git, only files: therefore you can't add an empty folder, it must have files in it.

Git is hard to learn, but once you're good with it it makes things a lot easier. (in terms of backing up code, managing Dev and stable versions, working with others).

Relevant: viewtopic.php?f=3&t=14262
 

User avatar
TumeniNodes
Member
 
Posts: 1335
Joined: Fri Feb 26, 2016 19:49
GitHub: TumeniNodes

Re: git grrrrrrrrrr

by TumeniNodes » Sat Apr 16, 2016 16:10

Well that explains even more now.
Gotta be honest, none of this seems to be that completely clear, unless I missed some info when I was initially looking into offering my work.
I am a Linux user, have been since 2007, and I know it seems strange a Linux user for so long as well have been on 2 Linux distro dev teams and even built and maintained a few packages (but mostly did UI graphics and artwork) and I am still not so great with command line, etc..
I do pick things up quickly though once I have done it physically..., but it is always that initial "first time" when I run into many who seem to forget a time when they, themselves did not know how to do things, and when they give an answer or explain what to do, it comes out to the lesser experienced user as jibberish.
But now I know and I will definitely put effort into learning how to use git.
I do have the needed git items which I just grabbed a couple from the Mint repo and will use those from now on.
Now, a question... so now that I just went through all of that, and uploaded all my stuff to a repo there at github... did I just do all of that for nothing? Cuz if so Im gonna be pretty upset
not to mention now I also have to create a new email to use as I really don't feel like having my personal email all over the place... it's all actually pretty annoying to be honest.
I'll do it, because I want to share and give back but..., while it may have some advantages, it has disadvantages as well
Flick?... Flick who?
 

User avatar
qwertymine3
Member
 
Posts: 194
Joined: Wed Jun 03, 2015 14:33
GitHub: Qwertymine
In-game: qwertymine3

Re: git grrrrrrrrrr

by qwertymine3 » Sat Apr 16, 2016 16:32

'git clone' is the command you want to look into.

Here are a couple of resources to help you start:
https://git-scm.com/book/en/v2 - It's a large book, but almost everything you'll ever need is in the first 3 chapters

https://www.atlassian.com/git/tutorials/what-is-version-control - This tutorial makes a number of comparisons to SVN, but does 'get to the point' very quickly with what it covers.
Avatar by :devnko-ennekappao:
 

User avatar
TumeniNodes
Member
 
Posts: 1335
Joined: Fri Feb 26, 2016 19:49
GitHub: TumeniNodes

Re: git grrrrrrrrrr

by TumeniNodes » Sat Apr 16, 2016 16:37

Thank you very much qwertymine3.

So..., what I need to know currently is, I do have the mod up at github now, can I share the link for it now on my initial post for my mod?
I also now have my git set up on my machine so, should be good t'go from here. But as I said, I still now have the repo I set up using the github web interface... is that any good? or is it now junk? :( heavy sigh
Flick?... Flick who?
 

User avatar
qwertymine3
Member
 
Posts: 194
Joined: Wed Jun 03, 2015 14:33
GitHub: Qwertymine
In-game: qwertymine3

Re: git grrrrrrrrrr

by qwertymine3 » Sat Apr 16, 2016 16:48

You should be able to 'clone' it to your local computer - this would copy the repository onto your computer and allow you to use it as if you had created it locally.

+ I recently heard about 'let me Google that for you' and want to use it
Avatar by :devnko-ennekappao:
 

User avatar
TumeniNodes
Member
 
Posts: 1335
Joined: Fri Feb 26, 2016 19:49
GitHub: TumeniNodes

Re: git grrrrrrrrrr

by TumeniNodes » Sat Apr 16, 2016 16:52

thanks, I will look into that... and
thank you all for the help, I really appreciate it
Flick?... Flick who?
 

User avatar
ExeterDad
Member
 
Posts: 1121
Joined: Sun Jun 01, 2014 20:00
In-game: ExeterDad

Re: git grrrrrrrrrr

by ExeterDad » Sat Apr 16, 2016 23:07

Don't feel bad TumeniNodes. I'm seriously git challenged for some reason. I know many things that puzzle many people that I know, but git related things make my brain hurt.
I have a few things on Github. And I refuse to admit how hard or how long it took me to get them up there.
٩(̾●̮̮̃̾•̃̾)۶

Kibbie and I have a beautiful public server now! HOMETOWN
 

User avatar
TumeniNodes
Member
 
Posts: 1335
Joined: Fri Feb 26, 2016 19:49
GitHub: TumeniNodes

Re: git grrrrrrrrrr

by TumeniNodes » Sun Apr 17, 2016 01:32

It is ironic how it's purpose is about management and organization..., yet it is so confusing off the start.
There is no reason in this age, that their system for handling folders, is the way it is.
The folder has "files" in it, should be able to drag-n-drop a folder with files in it. There are numerous places where this is possible. In my opinion there is no reason this could not be easily implemented with github.
I know once I use git a few times, it will be just a matter of repetition, but I imagine there are plenty of people who get annoyed in the beginning regarding this one issue.
Anyway, it is what it is..., I got my project up, and I feel bad complaining because I'm using a service which is offered for free. Maybe drag n drop folders is available with upgrading? I would certainly hope so because I would not pay for a service which does not provide such a simple feature, which exists just about everywhere else..., even with a free acct..
Flick?... Flick who?
 

User avatar
rubenwardy
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Re: git grrrrrrrrrr

by rubenwardy » Sun Apr 17, 2016 01:42

That's a misuse. Git is not really for uploading files, you'd just use eg dropbox for that. Git is for managing code versions. You're meant to be able to use it in the same directory as you code. It is confusing, but it's also very useful. Being able to push (upload) and pull (download) is just a way of sharing the change sets.

tl;dr: they don't add that feature because it's not how it should be done.
 

User avatar
TumeniNodes
Member
 
Posts: 1335
Joined: Fri Feb 26, 2016 19:49
GitHub: TumeniNodes

Re: git grrrrrrrrrr

by TumeniNodes » Sun Apr 17, 2016 01:49

Uh oh, now I'm more afused again :D
Are you saying basically, that I will be using git for "only" the coding portion of my mod? i.e. the Lua scripts and txt files? And then it matters not which means I use to move my image files back n forth?
Now that I can understand and makes sense (in my mind anyway... and it's a dark, damp place :P )
Flick?... Flick who?
 

User avatar
rubenwardy
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Re: git grrrrrrrrrr

by rubenwardy » Sun Apr 17, 2016 02:06

You should store images in it for mods as well, it's for code projects but you can have data resources.
 

User avatar
TumeniNodes
Member
 
Posts: 1335
Joined: Fri Feb 26, 2016 19:49
GitHub: TumeniNodes

Re: git grrrrrrrrrr

by TumeniNodes » Sun Apr 17, 2016 02:09

ok, got it. thanks.
I've got lots of reading to do : /

Man..., givin stuff away for free is a lotta work... :D

btw, I added some thanks to you on my mod post...
Flick?... Flick who?
 


Return to Modding Discussion

Who is online

Users browsing this forum: No registered users and 8 guests

cron