Back

NEW FORUM: Mobile & Responsive Design

#33
(2016-01-27, 5:07 pm)fuaburisu Wrote: I'll get down to it eventually. Ideally I wanted to fork off the MyBB git repo, but it caused me issues with file permissions and some configuration files that shouldn't have been commited and difficult to undo from my own branches (with my average git knowledge anyway). See this thread.
Sympathies on your git struggles -- it is not an easy version control system to learn. FWIW, some answers to some of your git questions from that thread:
Quote:This pulls the feature branch, for some reason I do not get the master as well
You do get all the remote repo's branches; they are in 'remotes/origin/<branchname>'. In this case the remote repo has chosen to make their HEAD be the 'feature' branch rather than the usual master (and their master branch is their last stable release, not head-of-current-development), but it's still there:
Code:
$ git branch -a
* feature
 remotes/origin/HEAD -> origin/feature
 remotes/origin/feature
 remotes/origin/master
In any case, branch names don't matter to git ('master' is just conventional), so you can branch from wherever works for you (or wherever works for upstream if you had anything you wanted to submit back to them). My guess is they've set HEAD to be feature because for doing upstream development you want to start from 'feature', not from 'master'. (They document what their branch structure is here.)  If you're just doing local changes against a specific stable release you can just branch against the tag, as you did.

Quote:git considers the file is staged, even though .gitignore is set to ignore it
This is as described in the gitignore manpage: files already tracked by git are not affected by .gitignore. It's there for you to list files that aren't tracked and which you'll never want to be tracked. The gitignore manpage also describes how to stop tracking a file that is currently tracked:
Code:
git rm --cached filename
You then need to 'git commit' that change, which removes the file from version control but leaves it in the filesystem. Once you've done that, then .gitignore will help you to keep it from accidentally sneaking back into version control again. Big caveat: if you do this then checking out a branch which has inc/settings.php in version control will delete your local copy. So I guess if you have anything interesting in that file you should probably commit it to git in your branch, rather than trying to get git to forget about it.

My guess (from absolutely no knowledge about myBB) as to why the upstream devs don't have this permissions-vs-git issue is that they probably work with a separate deployment/install phase, where they copy relevant things from their git tree to the server, rather than having the server directly run out of a git working tree. If you set things up like that then you can just not copy the git tree's settings.php when you deploy.
Edited: 2016-01-27, 6:57 pm
Reply

Messages In This Thread
RE: NEW FORUM: Responsive Design - by Bokusenou - 2015-11-15, 9:42 pm
RE: NEW FORUM: Responsive Design - by s0apgun - 2015-11-16, 3:40 am
RE: NEW FORUM: Responsive Design - by Bokusenou - 2015-11-17, 12:34 am
RE: NEW FORUM: Responsive Design - by Bokusenou - 2015-11-18, 11:31 am
RE: NEW FORUM: Responsive Design - by tokyostyle - 2015-11-19, 9:48 pm
RE: NEW FORUM: Responsive Design - by tokyostyle - 2015-11-20, 10:23 pm
RE: NEW FORUM: Mobile & Responsive Design - by pm215 - 2016-01-27, 6:56 pm
RE: NEW FORUM: General feedback - by Bokusenou - 2015-11-22, 4:25 am