{"id":18143538,"url":"https://github.com/mikofski/jgit4matlab","last_synced_at":"2025-06-18T11:39:17.831Z","repository":{"id":144951715,"uuid":"9480262","full_name":"mikofski/JGit4MATLAB","owner":"mikofski","description":"JGit wrapper for MATLAB","archived":false,"fork":false,"pushed_at":"2014-03-13T21:43:23.000Z","size":2937,"stargazers_count":5,"open_issues_count":19,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-23T01:02:00.253Z","etag":null,"topics":["git","matlab"],"latest_commit_sha":null,"homepage":"https://mikofski.github.io/JGit4MATLAB","language":"Matlab","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mikofski.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"license.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-04-16T19:05:51.000Z","updated_at":"2023-07-25T13:48:02.000Z","dependencies_parsed_at":"2023-03-22T19:31:43.134Z","dependency_job_id":null,"html_url":"https://github.com/mikofski/JGit4MATLAB","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/mikofski/JGit4MATLAB","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikofski%2FJGit4MATLAB","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikofski%2FJGit4MATLAB/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikofski%2FJGit4MATLAB/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikofski%2FJGit4MATLAB/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mikofski","download_url":"https://codeload.github.com/mikofski/JGit4MATLAB/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikofski%2FJGit4MATLAB/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260546171,"owners_count":23025888,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["git","matlab"],"created_at":"2024-11-01T19:07:57.804Z","updated_at":"2025-06-18T11:39:12.818Z","avatar_url":"https://github.com/mikofski.png","language":"Matlab","funding_links":[],"categories":[],"sub_categories":[],"readme":"JGit4MATLAB\n===========\nJGit4MATLAB is a wrapper for JGit in MATLAB. It is meant to be used from the\ncommand line.\n\nInstallation\n------------\nDownload the full zip-file from [MATLAB Central File Exchange]\n(http://www.mathworks.com/matlabcentral/fileexchange/), extract to your working\nMATLAB folder, usually `C:\\Users\\\u003cusername\u003e\\Documents\\MATLAB` and type `JGit`.\nThis will download the latest version of JGit and edit your Java class path file\ncalled `javaclasspath.txt` that is also in your MATLAB working folder, making a\ncopy called `javaclasspath.txt.JGitSaved` of `javaclasspath.txt` if it already exists.\n\nAfter this you must restart MATLAB for the changes to your MATLAB Java static\nclass path to take effect.\n\nUser Info\n---------\nSet your global gitconfig user name and email using the following:\n\n    jgit setUserInfo '\u003cJohn Doe\u003e' \u003cJohn.Doe@email.com\u003e\n\nYou can retrieve your global gitconfig settings as well.\n\n    [name,email] = JGit.getUserInfo\n\nSSH\n---\nCreate your SSH keys using [PuTTY gen]\n(http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html)\nand convert them to OpenSSH format. If you\nset a passphrase, save it in `%HOME%\\.jsch-userinfo` using the following:\n\n    jgit saveSSHpassphrase \u003cpassphrase\u003e\n\nUsage\n=====\nIn general usage is the same as in [Git](http://git-scm.com/docs/git-help) and\n[`org.eclipse.jgit.api.Git`](http://download.eclipse.org/jgit/docs/latest/apidocs/).\n\n    jgit \u003ccommand\u003e \u003cargs\u003e \u003cparam\u003e \u003ckey\u003e ...\n    JGit.command(args,param,key,...)\n\nCommands \u0026 Args \n---------------\n\nAdd\n---\nStage files to git repo.\n\n    jgit add file \n    JGit.add({'list','of','files'})\n\nBranch \n------\nCreate, delete, list and rename branches.\n\n    JGit.branch('list') % list local branches \n    JGit.branch('list',[],'listMode','REMOTE') % list remote branches \n    JGit.branch('create','newFeature') % create \"newFeature\" branch \n    JGit.branch('rename','superFeature','oldNames','newFeature') \n    JGit.branch('create','remoteBranch', ... \n        'startPoint','refs/remotes/origin/remoteBranch', ... \n        'upstreamMode','TRACK') % track \"remoteBranch\" \n    JGit.branch('delete',[],'oldNames',{'superFeature','remoteBranch})\n\nCheckout\n--------\nCheck out a branch or commit, create a new branch or check out files from the\nindex.\n\n    JGit.checkout('master') % checkout master \n    JGit.checkout([],'path',{'file2.m','file2.m'}) % check out files \n    JGit.checkout([],'startPoint','HEAD~1','path','file1.m') \n    JGit.checkout('newBranch','createBranch',true) create a new branch. \n    JGit.checkout('stable','createBranch',true, ... \n        'upstreamMode','SET_UPSTREAM','startPoint','origin/stable')\n\nClone\n-----\nClone a remote repository.\n\n    JGit.clone('git://github.com/eclipse/jgit.git', ... \n        'directory','repos/jgit')\n\nCommit\n------\nCommit files to git repo. Any combination of commands will work. If `getenv('EDITOR')`\nis empty then `notepad` is used. An empty commit message throws a Java JGit exception.\n\n    JGit.commit\n    JGit.commit('all',true)\n    JGit.commit('message','your commit message')\n    JGit.commit('amend',true)\n    JGit.commit('author',{'name','email'})\n    JGit.commit('committer',{'name','email'})\n\nDiff\n----\nView changes.\n\n    JGit.diff('previous','master',updated','feature', ... \n        'path',{'file1','file2},'difftool',true) % compare changes in file1 \n        and file2 between \"master\" and \"feature\" branches using the MATLAB \n        visual comparison tool. \n    JGit.diff('chached',true) % compare HEAD to staged files.\n\nFetch\n-----\nFetch changes from remote repository.\n\n    jgit fetch remote upstream\n\nInit\n----\nInitialize or reinitialize a Git repository.\n\n    JGit.init('directory','repositories/myRepo')\n\nLog\n---\nReturn commit log. Any combination of commands will work. Commits are entered\nas strings which can be SHA1 of the commit, HEAD~N, where N is the number of\ncommits from HEAD or as refs/heads/branch, where branch is the branch of the\ncommit. You can use 'since' and 'until' independently or together. 'Since' shows\ncommits newer than a given commit, and 'until' shows older commits. Commits are\nalways shown from newest to oldest. Push the enter key to advance and q+enter to\nquit.\n\n    JGit.log\n    JGit.log('maxCount', 3) % show last 3 commits\n    JGit.log('since','HEAD~5') % show last 5 commits\n    JGit.log('until','HEAD~5') % show all except last 5 commits\n    JGit.log('skip',3) % show commits starting 4 commits ago\n\nMerge\n-----\nMerge refs.\n\n    jgit merge ref\n\nPull\n----\nPull from repository.\n\n    jgit pull\n\nPush\n----\nPush ref to remote.\n\n    jgit push ref master remote origin\n\nStatus\n------\nReturn status of git repo. Staged files are links which will open them in the\nMATLAB editor.\n\n    jgit status\n    JGit.status\n\nOther\n-----\nCreate an `org.eclipse.jgit.api.Git` instance. With this you can do almost\nanything. EG: `git.reset.setRef('HEAD').addPath('JGit.m').call` will unstage the\nfile `JGit.m` from the current commit.\n\n    git = JGit.getGitAPI(gitDir) % create a Git instance for repo in gitDir\n\nTODO\n====\nThere are many porcelain functions that would be quick to implement:\n`config`, `reset`, `tag`, `rebase`.\n\nAll functions should call `JGit.getGitAPI` class function. Then they can use that\ninstance to do whatever. For other methods, use the appropriate `org.eclipse.jgit`\npackage directly.\n\nA GUI to mimic `gitk` and `git-gui`. GUI options for some porcelain commands like\nlog might also be nice. A log GUI that shows a banch graph would be especially nice.\n\nTo contribute, please clone the source at Github. Issues can also be posted on Github.\n\nhttps://github.com/mikofski/JGit4MATLAB\n\nFor more information about the JGit API see their documentation.\n\nhttp://download.eclipse.org/jgit/docs/latest/apidocs/org/eclipse/jgit/api/Git.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikofski%2Fjgit4matlab","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmikofski%2Fjgit4matlab","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikofski%2Fjgit4matlab/lists"}