I wrote a readme.md file for my git page. Now I wanna advertise for my program on some forums. I don't want to always update every single forum entry, so I though I just link to my git repo and they people can get the information about my tool just by reading the readme (in the future, all I need to is update this single file).
However, the source files are placed on the top and 99% of the people that will visit my repo won't have a clue about code. Therefore it would attract people more if they just see the readme.md instead of code (which might scare them away "oh I don't get it and it looks to hard to get a fast overview leave").
Is there a way to switch the code section with the readme.md section?
Is there a way to switch the code section with the readme.md section?
There is not for now in a classic GitHub repo.
One workaround would be to limit the number of top elements to a minimum, moving all those folders into a src/ or project/ subfolder.
That would make the code section very short, and the README (just below) that much more visible.
A different repo, as commented by the OP TrudleR, is available with GitHub pages, like a project site using the gh-pages branch.
For that approach, I like to declare that branch as a submodule in the master branch of the same project repo: that way, I can update my project pages while updating the sources of the project itself.
Update August 2016: Simpler GitHub Pages publishing now allows to keep your page files in a subfolder of the same branch (no more gh-pages needed):
Those pages can be in a subfolder of the same branch now.
Related
I feel like this question must have been asked before, but I'm not finding it on here. I have a file that I want in a GitHub repo, in this case a file in which the user would paste their API keys after cloning. I want this blank file to be cloned down, but I don't want it to be tracked or pushed. I already have it listed in the .gitignore file that is contained in the repo, yet after pulling and modifying the file, git status still shows the file as being tracked and having changes that need to be committed. How can I get around this?
You could do something like this via Github Enterprise's pre-receive hooks functionality.
From the readme, you can create a pre-receive hook that:
Prevents sensitive data from being added to the repository by blocking keywords, patterns or filetypes.
It is against general git workflow to make feature changes on a master branch. Sow= if I were to fork a repo my work ends up in .. feature branches..
How can I search those non-master branches on github?
Actually - even advanced search on Github seems to not find much of anything except for repository names and README files. It is not searching the codebase??
Here is an example of searching the yahoo user account for Process
: that should come up with dozens if not hundreds of hits. But we get .. four hits ..
So in general the github code search is a bit of a mystery . I really want to find certain code snippets .. either on master or another branch .. is there a way to do this??
There are tabs just below the header of the page - Repositories, Code, Commits, etc. If I click the Code tab I get 2k+ results.
There are some restrictions with searching code on GitHub, however, and branches other than master are not considered in the search. Also, only files smaller than 384 KB and repositories with less than 500,000 files are searchable. You can find more information related to searching code on GitHub here: https://help.github.com/articles/searching-code/
Just a short question:
Is it possible to show the current branch name in e.g. README.md automatically with a placeholder or something like that using GitHub Flavored Markdown?
No, I'm not aware of anything like that within READMEs or any other markdown documents when browsing through the source of your project. And nothing turns up when searching their help page either.
However, GitHub Pages offers all sorts of info about the repo the document is associated with. Of course, GitHub Pages is a very different thing than a README file, so that may or may not be helpful to you.
Is there any document about the whole process of building my blog with github pages?I have read the official introduction,but less help.
There are two different ways to create a GitHub page:
Create a repo called YOUR_USERNAME.github.io
Create a branch called gh-pages on a standard repo
Later, you must put some HTML files and commit. You will see the page running. You can also use Jekyll which has a template engine but it's a bit hard to start with it.
If you have a site called http://username.github.com and a project called projectname, do you
use http://github.com/username/projectname/tree/gh-pages to a) mirror your master branch, or b) create a webpage describing the project (to be reflected in http://username.github.com/projectname), or
not have a http://github.com/username/projectname/tree/gh-pages
branch at all?
What I understand of gh_pages as presented in pages.github.com, is that it is for:
creating a separate branch: your repo has now two roots (one for master and all the dev branches, one for gh_pages for GitHub published content).
The root for gh_pages branch has a special treatment when managed by GitHub.
"publish content to the web": and that can be any content you want.
So if you don't need a full space for documentations, you can just go with a readme.md file or an index.html page ("user page").
help.github.com itself is organized as documents within a gh_pages branches.
I usually don't have a project page at all (most of my public github projects are mirrors of other open-source projects), but on the ones where I do, I have a web page describing the project.
Although I just had an idea: might be neat to make a project's gh-pages branch contain a highlighted, hyperlinked version of your code (run it through Doxygen and have it only generate cross-referenced source instead of documentation, for example).