Upon brief Google and SO search, I couldn't find any info on this. I am looking at this Github repo which hasn't been updated for years, but there are many forks that are still being developed actively. Is there any way to search through commit messages from different forks of this Github repo network?
Beside the Google search already mentioned, another more precise alternative, if that repo is not too big, is to:
list all the forks with this API GET /repos/:owner/:repo/forks
clone them, and do a git grep in each of those local clones.
That way, you are sure to have a complete search.
See also the python frost-nzcr4/find_forks script.
View the Developer Tools while you're loading the repo network page. In the log you'll notice there's two urls - "meta" and "chunk".
Meta is the (json) list of all the users who are in the network and various properties needed to draw the graph, and "chunk" is the commit log from all the users in the graph, which is used to render the tooltips that come up.
Save these outputs and use your favourite text editor / command line tool to search the commit messages.
Related
I am looking for a place which maintain GitHub archives (Source code) periodically.
My requirement is, I need to analyze status of Java/C++/Python GitHub projects over the past years and identify trends of Softwares. For my analysis, I need the exact picture of GitHub for past couple of years. If there is anyplace which checkout GitHub projects periodically and make it available for research purposes, I would like to know a such place.
NOTE:
As far as I know GH Archive maintain, history of GitHub events. But what I need is the exact picture of source codes.
Why I can't go back to the commit history and find the exact picture? I won't be able to consider about deleted project if I consider current picture and try to go back to history.
For analyzing repos hosted on GitHub.com, you may need to contact GitHub support.
They may have these trend reports and share/sell them to you.
Hope this helps!
Is there a way to either scroll faster through the commit history OR go to the very beginning?
I don’t see an option, not even on desktop site.
I’m trying to figure out why a certain branch was made but that info is not in the README section because the README is not customized per branch.
I don't think github has this built in but there are a couple of ways using URLs.
With some trial and error using page? gets you to the beginning of the history fast: https://github.com/micropython/micropython/commits/master?page=242
This is less trial and error because you can enter nearly exact values: you know the current latest commit's hash and github says there's about 8450 commits so this one gets you to the first page: https://github.com/micropython/micropython/commits/master?after=cada971113e6db0cf9e0751e95dbe9217dd707b5+8420
There used to be a tool for it but the site is dead now so only the code is left.
But anyway, I'm fairly sure you'd achieve your actual goal way (examining log searching for something) faster without github, by using git itself. Github is fine for hosting but it's not exactly a complete git user interface. On th other hand git log/blame/rev-list commands are built for that. E.g. first commit hash: git rev-list --max-parents=0 HEAD
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/
I would like to create a "Revision page" where the people can see on what I've been working using GitHub there's an example about what I mean:
It is supposed to show the commits from my GitHub repository.
A) More information is required
Firstly, could you clarify if it is your intention to
Show the Commit history for a single repository, or
You wish to show your commit activity across multiple repositories
Also:
You wish to have this information displayed on Github, or
You
wish to have this information displayed on an external site.
B) Displaying information on GitHub
If the intention is a combination of 1 and 3, then my first suggestion would be to check the existing functionality of GitHub, which has such a feature built-in.
This can be accessed by navigating to your repository, and simply clicking the Commits button. An example of the results can be found here:
Example GitHub Commit History
C) Displaying information on an external site
As you mention that you have limited experience with PHP, I would certainly start by evaluating GitList:
GitList allows you to browse repositories using your favorite browser,
viewing files under different revisions, commit history and diffs.
GitList is free and open source software, written in PHP, on top of
Silex and the Twig template engine.
If you feel confident that you could create your own solution to display the information in an external web page, then you should begin by familiarising yourself with the GitHub Developer Documentation, and specifically:
List commits on a repository
It is also worth examining the following article and existing GitHub project in order to enhance your knowledge:
How to Use Github’s API with PHP (SitePòint Article with code)
GitHub PHP Client (GitHub Project)
It may be that you can clone one of these projects, strip it down to the features essential for your needs, and customise the UI.
I Want to search all our codebase in our Github installation for different text strings. We have app. 90 different repositories.
Is there such a method?
I can only find search for file names, authors etc., not search for strings inside code. My task is to find every project which uses or refers to systems, classes, methods etc. that soon are obsolete.
Alternately: Is there a method to download/clone all repositories in one action?
We use SourceTree as client software.
You can search directly at the top of an Organisation now. This results in the prefix org:.
e.g. if you wanted to search all twitter repos for the word bot you would search for org:twitter bot
https://github.com/search?l=&q=org%3Atwitter+bot&ref=advsearch&type=Code
You can search multiple repositories by adding the repo: option to your query, which you can see in action on GitHub's advanced search page. Each repo value takes the usual user/repository form. For example:
find_me repo:me/foo repo:you/bar repo:company/baz
To make a list of all your repositories if you don't have one, an easy way might be GitHub's repositories API.
Once you have the list, it would also be simple to clone everything with a simple shell script. I don't believe GitHub has a built-in feature for that.
while read repo; do
git clone https://github.com/$repo
done < list_of_repos.txt
Since it sounds like you're pulling an organization's repos, caniszczyk has a Gist doing just that. I'll copy the core of it here, but there's some discussion with updates and help for private repos.
curl -s https://api.github.com/orgs/twitter/repos?per_page=200 | \
ruby -rubygems -e 'require "json"; JSON.load(STDIN.read).each { |repo| %x[git clone #{repo["ssh_url"]} ]}'
There's also another SO question asking about it, and a full backup script to get issues, wikis, etc.