Response
stringlengths
8
2k
Instruction
stringlengths
18
2k
Prompt
stringlengths
14
160
I suspect you missed the webhook url. Besides checking the Build when a change is pushed to GitHub option, you should also add the webhook url into your Github repository to get the Auto trigger mechanism to work and here is how: Go to your Github repository: Settings--> Webhooks&Services-->Service--> Add Services--> Choose "Jenkins (GitHub plugin)" Then fill in the Jenkins hook url with your jenkins url like this: http://your_jenkins_url/github-webhook/ And, VERY IMPORTANT, since you are installing your jenkins server in your localhost, please be aware that you shouldn't fill in above Jenkins hook url like http://localhost:8080/github-webhook/ because Github is not able to recognize localhost or 127.0.0.1 or 192.168.*.*. Either you should use an externally accessible DNS name or an IP address, which can be recognized by Github.
Jenkins is running on localhost. I have my repository in GitHub. I have the option to 'Build when a change is pushed to GitHub' checked. When I click 'Build Now', build is done successfully, no issues there. But when am committing code to my repository, auto build is not happening. I can access GitHub from my system as the repository is public and I believe even Jenkins should be able to detect it. I know there is a polling option but I want Jenkins to build when change is detected in repository(as this is what we have been trying to achieve). Configuration: Jenkins 1.615 Git Plugin 2.3.5 Git Client Plugin 1.17.1 ———————————————————————————————————————————— EDIT: "Build when a change is pushed to GitHub" option has been renamed to "GitHub hook trigger for GITScm polling" in most recent version of GitHub plugin. (thanks to @smrubin's feedback.)
Jenkins-Build when a change is pushed to GitHub option is not working
I'd need more info to fully understand the current situation, such as the current size of the repo, how many times you've pushed, how many other colloborators are working in the same repo, but here are several possible courses of action: If you don't have any collaborators (you are the only user), it's quite possible that you have a full copy of the repo locally. Are all the files intact locally? Wait until next month, when you get another 1 Gb+ of free bandwidth, download the repo first thing, then change your settings. It may be possible to download the latest commit as a zip file directly on the Github website if only command line access has been limited, not sure if this option is available with LFS. Pay to get it unlocked Check the options to see if Git-LFS can be disabled remotely (I don't think this is possible) Once you can get the full repo cloned locally, you can turn off Git-LFS, make a commit, and either push back up to the current repo, or push up to a new repo (either at Github or a different hosting site). I'm not 100% sure if disabling Git-LFS in the config locally will also disable it fully on Github for the remote repo.
H! I installed LFS in my github repository to track my *.csv files but when someone else tried to upload other csv and I wanted to make the pull of my repository this was the result This repository is over its data quota. Account responsible for LFS bandwidth should purchase more data packs to restore access. My question is How can I recover the access to my repository, it doesn´t matter if I can not use anymore LFS I will move my csv files to other place, I just want to recover the access to my github repository and being able to push and pull.
This repository is over its data quota. Account responsible for LFS bandwidth should purchase more data packs to restore access
Here's how you construct the URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
I can't seem to find out how to get the URL of a test workflow anywhere in the docs. I have a simple job which runs tests and on fail it needs to post the URL of the failed job to another web service. I was expecting this to be in the default env vars but apparently not. Thanks,
github actions get URL of test build
Since you have already made 5 commits since the commit containing the clear text password, you best bet is to do a git rebase -i in interactive mode on your local branch. Find the SHA-1 of the commit where you added the clear text password, and type the following: git rebase --interactive dba507c^ where dba507c are the first 7 characters of the SHA-1 for the bad commit. Change this: pick dba507c comment for commit containing clear text password To this: edit dba507c I have removed the clear text password Make the change to the password file to remove the clear text, then commit your result like this: git commit --all --amend --no-edit git rebase --continue Finish the rebase, then push your (correct) local branch to the remote via: git push -f origin your_branch You will need to force push your_branch because you have rewritten history (by modifying the password file). Now you have all your latest commits, but you have removed the clear text.
I pushed a file containing a password to my repo by mistake - FYI the repo is just a small personal project. Once I realised the password was present I added the file to .gitignore and executed git rm -r --cached <filename>, committed and pushed to the repo. I now realise the password is still present in the history - what is the best way to remove it? I read the Remove sensitive data page on Github which suggests changing the password - which I have done - but I would like to remove the history as well.
How do I properly remove sensitive data pushed to a Git repo?
There needs to be at least one push to trigger a page build so by doing a git push origin master, I got the page to rebuild.
Are github pages within my account created automatically when I fork a repo which already includes gh-pages branch?
Are Github pages created automatically in the fork of a repo which has a gh-pages branch?
The GitHub blog post about 2-Factor Authentication mentions that you can generate a "personal access token", that can be used in place of a password when 2-Factor Auth is enabled: I'm not sure if it will actually work with TortoiseGit, but maybe you can give it a try? You can generate an access token at the Authorized applications settings page:
We like TortoiseGit, and want to take advantage of GitHub's 2-Factor Authentication...but the two don't seem to want to work together.
Can I use GitHub's 2-Factor Authentication with TortoiseGit?
This is a relative solution, because the limit is still 5000 API calls per hour, or ~80 calls per minute, which is really not that much. I am writing a tool to compare over 350 repositories in an organization and to find their correlations. Ok, the tool uses python for git/github access, but I think that is not the relevant point, here. After some initial success, I found out that the capabilities of the GitHub API are too limited in # of calls and also in bandwidth, if you really want to ask the repos a lot of deep questions. Therefore, I switched the concept, using a different approach: Instead of doing everything with the GitHub API, I wrote a GitHub Mirror script that is able to mirror all of those repos in less than 15 minutes using my parallel python script via pygit2. Then, I wrote everything possible using the local repositories and pygit2. This solution became faster by a factor of 100 or more, because there was neither an API nor a bandwidth bottle neck. Of course, this did cost extra effort, because the pygit2 API is quite a bit different from github3.py that I preferred for the GitHub solution part. And that is actually my conclusion/advice: The most efficient way to work with lots of Git data is: clone all repos you are interested in, locally write everything possible using pygit2, locally write other things, like public/private info, pull requests, access to wiki pages, issues etc. using the github3.py API or what you prefer. This way, you can maximize your throughput, while your limitation is now the quality of your program. (also non-trivial)
I am developing a web application which needs to send a lot of HTTP requests to GitHub. After n number of successful requests, I get HTTP 403: Forbidden with the message API Rate Limit Exceeded. Is there a way to increase the API Rate limit or to bypass it altogether for GitHub?
Is there a way to increase the API Rate limit or to bypass it altogether for GitHub?
You really need to answer a basic question first. Do you want to use Mercurial or Git. I had to make this decision earlier this year. Mercurial was by far easier to setup and start using. I ultimately chose Git for the following reasons: Most OpenSource Projects are moving from SVN to Git Git allowed the most flexibility in whatever I wanted to do. (This is the main reason) Third-party integration If your business might need complicated version control processes go with Git. The learning curve is steep but it will be easier to do what you really want at the end of the day. I will qualify what I mean by 'steep'. The difference between teaching someone Mercurial vs. Git, is trying to get a Windows user to learn Linux command lines. If you want a quick easy to use DVCS in which you think simple branching and versioning is all you will ever need, don't kill yourself with Git, use Mercurial. But keep in mind most people you talk to in Mailing lists, IRC, etc. will have experience with Git not Mercurial. If you plan on paying for GitHub or BitBucket, I suggest you also look at Kiln. FogCreek has made mercurial even easier.
Closed. This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 10 years ago. Improve this question Disclaimer: This is a subjective question. Please follow relevant guidelines. I am considering the migration of source code from a traditional VCS to a DVCS. Since having a decent GUI web-based frontend and workflow tools are a must, the two obvious candidates are Bitbucket and Github. Unfortunately I have no in-depth experience with either of them, so I'd really like to have a few second opinions before taking the dive. Especially welcome would be observations from a team/business perspective regarding day-to-day usage and features that have an impact on productivity. What is Your experience with either of them? Any particular highlights or annoyances?
Comparing the pros and cons of Bitbucket to Github [closed]
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.
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.
Searching in multiple Github repositories
21 On OS X v10.9 (Mavericks): Google Chrome: 125 Firefox: 122 Safari: 121 Share Follow edited Jun 24, 2019 at 16:30 Peter Mortensen 31k2222 gold badges108108 silver badges132132 bronze badges answered Aug 26, 2014 at 14:25 cubuspl42cubuspl42 8,13344 gold badges4242 silver badges6565 bronze badges 1 2 Ahh thank you! I'm glad to know that 120 Chars is a 'safe' character limit cross platform! – ThorSummoner Aug 26, 2014 at 17:32 Add a comment  | 
I simple wanted to know how many characters can be viewed without overflow (horizontal scrolling) on any GitHub source view page.
What is GitHub's character limit, or line length for viewing files on GitHub?
I've written a Python script to migrate issues. It's at https://github.com/ttencate/sf2github. Beware: Sunday afternoon software. Use at your own risk, etc. etc. Pull requests welcome!
I'm thinking about migrating a project from Sourceforge to Github. Besides the svn to git, what about migrating things like the issue tracker? Is there an easy way to do that?
Migrate from Sourceforge to Github
Gist is a simple way to share snippets and pastes with others. Whereas Repo is simply a place where the history of your work is stored. There is no good answer, it's personal preference. I make mine a conceptual distinction. If it's code designed to demonstrate a technique, teach a principle, or show off a solution it goes in a gist. Doesn't matter if it's one file or 30 files. If it's actual code intended to be run, used as is, or forked as boilerplate I put it in a proper repository.
I'm publishing a tutorial that includes a lot of code interspersed with documentation. I'm considering two ways of hosting the code: Separate git repository with code files and markdown files explaining the code Github gist containing both of these Are there advantages of hosting in a gist v/s a repository? When would one prefer one of these over the other?
Gist Vs. Repository for Tutorial
29 Despite the misleading/broken github interface there's actually a way to get what you want. You need to drop one . Instead of: https://github.com/account/repo/compare/ath/branchA...branchB do https://github.com/account/repo/compare/ath/branchA..branchB This compares branch heads instead of simply using the base branch to find the merge base. github's reponse is what clued me in from @edwin-evans' response: This is a result of the type of diff we use on GitHub. We use git’s three dot diff, which is the difference between the latest commit on the HEAD branch and the last common ancestor commit with the base branch. Share Follow edited Jan 29 at 15:22 answered Apr 4, 2022 at 17:11 CatskulCatskul 18.4k1515 gold badges8686 silver badges116116 bronze badges 3 1 Based on below official doc 1. Create new branch x from base branch 2. Merge your branch into branch x 3. Check the pull request diff between base branch and x branch, the diff show work as expected docs.github.com/en/pull-requests/… – Guizhou Feng Aug 24, 2022 at 9:51 But why Github chooses three dots instead of two dots? When merged, two dots diff is the effective one, isn't it? – Roeniss Mar 30, 2023 at 12:41 Never mind. I found the reason : "Since the three-dot comparison compares with the merge base, it is focusing on 'what a pull request introduces'. When you use a two-dot comparison, the diff changes when the base branch is updated, even if you haven't made any changes to the topic branch." – Roeniss Mar 30, 2023 at 12:47 Add a comment  | 
I am having two branches: - master and - develop. I am trying to merge branch develop into master branch. I have checked with Tower and Araxis merge, those two branches are identical. But when I do a pull request on Github, I am seeing that there are 381 files changed, like files are not on master at all. Any ideas why this behavior? Update: I am attaching screenshot of pull request.
Github pull request shows wrong diff
Googled "Permission denied (publickey). fatal: The remote end hung up unexpectedly", first result an exact SO dupe: GitHub: Permission denied (publickey). fatal: The remote end hung up unexpectedly which links here in the accepted answer (from the original poster, no less): http://help.github.com/linux-set-up-git/
This question already has answers here: Closed 11 years ago. Possible Duplicate: github: newbie problems -> Permission denied (publickey). fatal: The remote end hung up unexpectedly please see the below command , $ git clone git://github.com/{user_name}/{project_name}.git Initialized empty Git repository in /home/dengx/rorBlog_demo/rorblog/.git/ Changing the files and committing it, so i need to push back to git repository. $ git push [email protected]/{user_name}/{project_name}.git master Permission denied (publickey). fatal: The remote end hung up unexpectedly so, i copy the ssh-key of the repository to my file ~/.ssh/id_rsa.pub, and then push again, $ git push [email protected]/{user_name}/{project_name}.git master Agent admitted failure to sign using the key. Permission denied (publickey). fatal: The remote end hung up unexpectedly Now, what should i do , thanks any helps.
Permission denied (publickey). fatal: The remote end hung up unexpectedly while pushing back to git repository [duplicate]
11 GitHub's website currently seems to be: Using blob for files, and tree for directories, in URLs; Redirecting browsers which request file URLs containing tree to contain blob instead; and Redirecting browsers which request directory URLs containing blob to URLs containing tree instead. It's possible that GitHub's website, at the time you asked the question, was only rewriting file URLs between tree and blob, instead of properly redirecting them. (Rewriting and redirecting URLs are activities of web servers.) If so, then the change wouldn't appear in your browser's address bar. But maybe you didn't mean that. Share Follow edited May 27, 2020 at 14:38 answered May 22, 2020 at 16:35 MarkDBlackwellMarkDBlackwell 2,0841919 silver badges2727 bronze badges Add a comment  | 
I keep noticing this whenever I'm trying to add links to github files. You can add a link using blob: https://github.com/facebook/pop/blob/master/Podfile And the same doc comes up if you change blob to tree: https://github.com/facebook/pop/tree/master/Podfile What is the difference? Whenever I want to add a link for posterity in a doc, which one should I prefer?
In GitHub URL's: what is the difference between a tree and a blob?
8 I sometimes use Diff Checker tool on the diffchecker website. It is an online diff tool to compare text differences between two text files. Link: https://www.diffchecker.com/diff Share Follow answered May 31, 2015 at 9:09 Rahul GuptaRahul Gupta 47.4k1010 gold badges114114 silver badges128128 bronze badges 1 Thanks, but I need something that dynamically pulls the latest sources from github. I've updated the question to be clearer. – Ross Bencina May 31, 2015 at 9:48 Add a comment  | 
Can I use the github /compare to display the difference between two different source files in HEAD? Here is how I do it on the command line with git diff: git diff HEAD:docs/tutorial/01-boxed-function-pointers.cpp HEAD:docs/tutorial/02-raw-actors.cpp My best guess at the github syntax is the following. But it doesn't work: https://github.com/RossBencina/Fractorp/compare/HEAD:docs/tutorial/01-boxed-function-pointers.cpp...HEAD:docs/tutorial/02-raw-actors.cpp I specifically want an on-line pretty-printed HTML render of the diff. If this can't be done with github, can anyone recommend a third-party website that will render diffs of two arbitrary files hosted on github? Edit #1: Thanks to the answers who recommended https://www.diffchecker.com. However, I need to be able to specify the source files as current HEAD on github. Any third-party tool would need to automatically pull the latest source files from github repo URLs. I notice that http://www.mergely.com can import source from URLs. However I am looking for a live view that always uses the latest HEAD. Thank you.
Github/compare: How to diff two different files (different file names, both in HEAD)?
Thanks to a tweet from @caged, I wrote this Perl script to iterate over months in my contributions: use v5.12; use warnings; use utf8; my $uname = 'theory'; my %projects; for my $year (2012..2014) { for my $month (1..12) { last if $year == 2014 && $month > 1; my $from = sprintf '%4d-%02d-01', $year, $month; my $to = sprintf '%4d-%02d-01', $month == 12 ? ($year + 1, 1) : ($year, $month + 1); my $res = `curl 'https://github.com/$uname?tab=contributions&from=$from&to=$to' | grep 'class="title"'`; while ($res =~ /href="([^"?]+)/g) { my (undef, $user, $repo) = split m{/} => $1; $projects{"$user/$repo"}++; } } } say "$projects{$_}: $_" for sort keys %projects; Yeah, HTML scraping is kind of ugly, but did the trick for my needs.
This question already has answers here: GitHub API: Repositories Contributed To (13 answers) Closed 8 years ago. I realize I can hit https://api.github.com/users/:user_id/repos to get a list of all the repos I own or have forked. But what I would like to do is figure out all of the projects I have contributed to (commits, pull requests, issues, etc.) over the last year. The events API lets me get the last 300 events, but I have contributed a lot more than that in the last twelve months. Is this possible?
How do I get a list of all the GitHub projects I've contributed to in the last year? [duplicate]
Yes you can, but that is not recommended at all. You can delete everything in .gitignore file and push them from a working project. Then it will work perfectly where you git clone them. But there are so many drawbacks in this way. I recommend you not to do that.
I'm new to GitHub and I found this site very useful for a lot of us. I came upon storing my Laravel project here in GitHub, but there's a problem every time I will clone it to be able to go to production, when I'm about to clone it at first, it always shows this error. Warning: require(C:\xampp\htdocs\tourismPortal\bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory in C:\xampp\htdocs\tourismPortal\bootstrap\autoload.php on line 17 Fatal error: require(): Failed opening required 'C:\xampp\htdocs\tourismPortal\bootstrap/../vendor/autoload.php' (include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\tourismPortal\bootstrap\autoload.php on line 17 I know this will be solved by using composer update on it, but is there any way to prevent this error so that every time I clone it, I will go to production without encountering this error? Thanks, by the way, I'm using tortoisegit to clone, pull and push.
cloning laravel project from github
Nevermind, I solved it. If anyone has the same problem. GitHub Pages are case sensitive. Not only for folders, but also for image names.
I added a project site to my Github project. But some photos are not displaying in the site. Img code: <img src="img/screenshot2.PNG" class="img-responsive" alt=""> </div> folder structure (img is a folder): img Screenshot2.png index.html I tried with .png and .PNG (some earlier SO answers suggested it) and none of them work Any solutions?
Images not displaying in Github Pages?
I was having the same problem on various CentOS 6 VM's and it turned out to be an issue with stale curl and nss libraries (thanks to this thread for pointing me in the right direction: cURL SSL connect error 35 with NSS error -5961). The fix that worked for me is just: yum update -y nss curl libcurl
I have been using git lots for the last few months. git push worked 12 hours ago now all attempts generate errors, with verbose it produces this: GIT_CURL_VERBOSE=1 git push * Couldn't find host github.com in the .netrc file; using defaults * About to connect() to github.com port 443 (#0) * Trying 192.30.253.112... * Connected to github.com (192.30.253.112) port 443 (#0) * Initializing NSS with certpath: sql:/etc/pki/nssdb * CAfile: /etc/pki/tls/certs/ca-bundle.crt CApath: none * NSS error -12190 * Expire cleared * Closing connection #0 fatal: unable to access 'https://github.com/waveney/wmff/': SSL connect error Any bright ideas? No changes to server from when it worked to now, restart made no difference
Github unable to access SSL connect error
For example, I have a.jpg on the google drive. Right click the image and click Share... Click Advanced and change the Who can access option to Public on the web - Anyone on the Internet Copy the link to share and you will have something like https://drive.google.com/file/d/<FILE_ID>/view?usp=sharing Copy the <FILE_ID> to make a link like this: https://drive.google.com/uc?export=view&id=<FILE_ID> Insert image in Markdown as ususal using the link from step 4. For example: ![image](https://drive.google.com/uc?export=view&id=<FILE_ID>) Example: I have this octocat image in google, and its file id is 1913oZeBZPBNiUuk8gu3ZSbLBA2l_VQtG. You can try ![image](https://drive.google.com/uc?export=view&id=1913oZeBZPBNiUuk8gu3ZSbLBA2l_VQtG) in your markdown file or even in this answer. Hope this helps.
I have the image in Drive, How could it be added to the Readme.md so as to display the image in readme. I had tried with the shared link, but it isn't working.
Add Image to GitHub Readme.md from Google Drive
You can't push into other people's repositories. This is because push permanently gets code into their repository, which is not cool. What you should do, is to ask them to pull from your repository. This is done in GitHub by going to the other repository and sending a "pull request". There is a very informative article on the GitHub's help itself: https://help.github.com/articles/using-pull-requests To interact with your own repository, you have the following commands. I suggest you start reading on Git a bit more for these instructions (lots of materials online). To add new files to the repository or add changed files to staged area: $ git add <files> To commit them: $ git commit To commit unstaged but changed files: $ git commit -a To push to a repository (say origin): $ git push origin To push only one of your branches (say master): $ git push origin master To fetch the contents of another repository (say origin): $ git fetch origin To fetch only one of the branches (say master): $ git commit 0 To merge a branch with the current branch (say $ git commit 1): $ git commit 2 Note that $ git commit 3 is the name of the branch you fetched in the previous step from $ git commit 4. Therefore, updating your master branch from origin is done by: $ git commit 5 You can read about all of these commands in their manual pages (either on your linux or online), or follow the GitHub helps: https://help.github.com/articles/create-a-repo for commit and push https://help.github.com/articles/fork-a-repo for fetch and merge
I have forked a private repository (an iPhone project) as follows: cd nameofdirectory git init git clone forkedURL Now I want to push the changes done by me to my forked repository so that the main admin can review my written code and merge it with the main repository. How can I push the changes done by me to my forked repository using terminal on MacOS?
How to use terminal commands with Github?
Gist changed the path to this file pattern: https://gist.github.com/<USER_NAME>/<GIST_ID>/raw/<GIST_REVISION_ID>/<GIST_FILE_NAME> You will notice that now the top answers' links are 404'ing. Simply apply this new pattern and voilà! https://gist.github.com/<USER_NAME>/<GIST_ID>/raw/<GIST_FILE_NAME> For instance: https://gist.githubusercontent.com/wesbos/cd16b8b1815825f111a2/raw/lol.js
I have a gist with some javascript code in a script tag, like so: <script src="https://raw.github.com/gist/b25dff23c2c4b4bd425a/f157aa95163311c4b58febb06b49ffd16419f642/images.js"></script> And I will need to keep editing the JS file on github. However, when you edit a gist it changes the URL of the gist. How do I keep the same URL?
Github gist editing without changing URL
66 I think you are talking about your organisation's private repo, right? As I didn't find this checkbox for personal private repositories. If so, then you need to: go to your organisation's settings, Member privileges, and check "Allow forking of private repositories" . go to your repo and you'll see "Allow forking" will be automatically checked after doing step 1, . The process is also described here: https://docs.github.com/en/organizations/managing-organization-settings/managing-the-forking-policy-for-your-organization Share Follow edited Jul 15, 2023 at 9:48 Adam Azad 11.2k55 gold badges3030 silver badges7171 bronze badges answered May 19, 2021 at 14:42 BL1N0VBL1N0V 76155 silver badges55 bronze badges Add a comment  | 
I have a private repo. I noticed I cannot fork it. I cannot find any information that says I shouldn't be able to. When I go to Options the ability to fix this is disabled. I am guessing you need to pay or something which is fine, but it doesn't say that anywhere... Cannot click!
Cannot enable forking on github repo
Here's a basic web.py example for receiving data via POST and doing something with it (in this case, just printing it to stdout): import web urls = ('/.*', 'hooks') app = web.application(urls, globals()) class hooks: def POST(self): data = web.data() print print 'DATA RECEIVED:' print data print return 'OK' if __name__ == '__main__': app.run() I POSTed some data to it using hurl.it (after forwarding 8080 on my router), and saw the following output: $ python hooks.py http://0.0.0.0:8080/ DATA RECEIVED: test=thisisatest&test2=25 50.19.170.198:33407 - - [27/Jan/2013 10:18:37] "HTTP/1.1 POST /hooks" - 200 OK You should be able to swap out the print statements for your JSON processing. To specify the port number, call the script with an extra argument: $ python hooks.py 1234
Github offers to send Post-receive hooks to an URL of your choice when there's activity on your repo. I want to write a small Python command-line/background (i.e. no GUI or webapp) application running on my computer (later on a NAS), which continually listens for those incoming POST requests, and once a POST is received from Github, it processes the JSON information contained within. Processing the json as soon as I have it is no problem. The POST can come from a small number of IPs given by github; I plan/hope to specify a port on my computer where it should get sent. The problem is, I don't know enough about web technologies to deal with the vast number of options you find when searching.. do I use Django, Requests, sockets,Flask, microframeworks...? I don't know what most of the terms involved mean, and most sound like they offer too much/are too big to solve my problem - I'm simply overwhelmed and don't know where to start. Most tutorials about POST/GET I could find seem to be concerned with either sending or directly requesting data from a website, but not with continually listening for it. I feel the problem is not really a difficult one, and will boil down to a couple of lines, once I know where to go/how to do it. Can anybody offer pointers/tutorials/examples/sample code?
How do I receive Github Webhooks in Python
Depending on where they are located: rm github_rsa.pub and rm id_rsa.pub If they are in the default location then you can do rm ~/.ssh/github_rsa.pub and rm ~/.ssh/id_rsa.pub However this is likely answered already elsewhere.
How would I delete github_rsa.pub and id_rsa.pub SSH certificates from my mac computer using mac terminal?
Deleting SSH keys terminal
To solve the problem, I removed the file from git, then re-added it by doing the following: git rm "myPathToAFile" git add . git commit -am 'my commit' Hope this helps someone else!
I ran into this error, and found very little documentation on how to fix it online. I got the error by trying to run the command git add ., and received this response: fatal: unable to stat 'myPathToAFile': No such file or directory
Git error fatal: unable to stat '*': No such file or directory
If someone encounters a bug with one of GitHub's products, they can submit it to the below URL. It creates a ticket to track the correctness of a bug. https://support.github.com/contact/bug-report
I have a perfectly valid repository which doesn't display correctly on GitHub. How do I report this to GitHub to get them to fix it? This also affects the git command line tool, unfortunately. If you want to know what's going on, look at the 'encoding' attribute of the commit.
Where can I report a GitHub bug?
The docs for updating a file specify that you will need to provide the SHA for the file you will be replacing. The easiest way would be to query github for that, too. For example: > curl https://api.github.com/repos/testacc01/testrepo01/contents/test.txt { "name": "test.txt", "path": "test.txt", "sha": "4f8a0fd8ab3537b85a64dcffa1487f4196164d78", "size": 13, … So, you can see what the SHA is in the "sha" field of the JSON response. Use that when you formulate your request to update the file with a new version. After you have successfully updated the file, the file will have a new SHA that you will need to request before it can be updated again. (Unless, I guess, your next update goes on a different branch.)
I'm using this API to update a file on my repo, it requires me to have a valid SHA blob for a file that I want to update: http://developer.github.com/v3/repos/contents/ How do I find the SHA blob for the specific file? Supposed in my testrepo in the test account here, what is the SHA blob for the test.txt file? https://github.com/testacc01/testrepo01 Thank you so much!
How to find a Github file 's SHA blob
Pulling in a single commit would be a cherry-pick and would rewrite the commit ID (and mark you as the committer while retaining the author). The process is pretty straightforward, though: git fetch git://github.com/user/project.git git cherry-pick <SHA-COMMIT-ID> You get the SHA from the repository log, for example: git log --oneline b019cc0 Check whether we have <linux/compiler.h>. 0920898 Include <linux/compiler.h> before including <linux/usbdevice_fs.h>. cbf0ba1 Add DLT_DBUS, for raw D-Bus messages. 77ed5cd Libnl 2.x returns its own error codes, not errnos; handle that. With git cherry-pick 0920898 you bring the respective commit to your current branch.
Someone forked a Github project of mine and made some changes. How can I merge the changes back in to my upstream version? Also, is it possible to pull in just a specific commit? What I'm looking is if there is a way to pull a specific commit instead of the entire branch.
Pull in changes from a Github fork
If my memory serves me correctly, then if you force push or update the branch in question in any way, GitHub will automatically update the pull request. If doing the force push would result in the pull request not being possible, then GitHub will tell you this. You do not need to worry about updating the pull request as GitHub will take care of this for you. This being said, doing a git push --force on any remote branch can cause mayhem for your coworkers who are also currently working on this branch. So you are correct to be shying away from doing a force push, but fortunately a GitHub pull request is not your biggest problem.
I am working on a git branch that is currently part of a closed pull request on github. Subsequently to the initial pull request, I made some additional commits, pushed those commits to github, and then reverted those commits and recommitted them because I need to revise the commits. Now if I want to push those commits to github, I'll need to issue a force push: git push --force. But I have the strong feeling that this might cause mayhem with the existing pull request, even though the changed commits occurred after the commits that existed prior to me making the pull request. Can anyone describe to me how best to handle this situation? I think I may need to just create an entirely new branch and then issue a pull request on that branch instead. But if there's a way to link this to the existing pull request that would be preferable.
What happens if you force push to a branch with an existing pull request?
It's a bit weird, but if you use git pull [remote] <refspec> it actually doesn't update the remote refs. It sort of makes sense if you think about it a certain way: since you're specifying a specific ref to fetch, it doesn't have to look up anything about your remote branches, so it doesn't inherently know what remote branch it should update. It of course could figure it out, and I wouldn't be surprised if it gets fixed eventually, but that's the existing behavior. (There may be messages on the mailing list about it - I don't know.) You can easily work around it, though. If you use git pull origin/master, since you're specifying what to fetch via a remote branch, it should update that remote branch. And if you're on your master branch anyway (or any other branch tracking origin/master), you can just do git pull and let it fill in the defaults, and it will update remote branches. This is documented in the git-pull man page, most concisely under EXAMPLES but also elsewhere. The relevant part: Merge into the current branch the remote branch next: $ git pull origin next This leaves a copy of next temporarily in FETCH_HEAD, but does not update any remote-tracking branches. Using remote-tracking branches, the same can be done by invoking fetch and merge: $ git fetch origin $ git merge origin/next
According to the documentation, git pull performs a git fetch then a git merge, however in that case performing git pull origin master should perform a git fetch origin master right? However, it does not appear to be doing so. Here is an example. Supposed my remote origin master (on GitHub in my case) has the following history: commit 1111111 : my first commit commit 2222222 : a commit from someone else and I only have my first commit locally as doing following shows git checkout master git log --pretty=format:'%h' -n 1 1111111 git checkout origin/master git log --pretty=format:'%h' -n 1 1111111 From here I do my pull and look at the results as follows: git checkout master git pull origin master git log --pretty=format:'%h' -n 1 2222222 git checkout origin/master git log --pretty=format:'%h' -n 1 1111111 As can be seen, the pull did in fact update my master branch with the new commit(s) from the remote origin, but my local origin/master is still where it was. Forcing me to do the following git fetch origin master git checkout origin/master git log --pretty=format:'%h' -n 1 2222222 Is this correct behavior for git pull or might I have something miss configured? I looked through the git pull man page and didn't see anything that suggested this but I may have missed it.
git pull origin master does not update origin/master?
8 First, one obtains a list of commits (as with git rev-list), and parents of each commit. A "column reservation list" is kept in memory. For each commit then: If the commit has no column reserved for it, assign it to a free column. This is how the branch heads will start. Print the tree graphics according to the column reservation list, and then the commit message The reservation's list entry for the current column/commit is updated with the first parent of the current commit, such that the parent is going to be printed in the same column. Other parents get a new free column. If this was a merge, the next line will try to link the second parent to a column where the commit is expected (this makes for the loops and the "≡ bridge") Example showing output of git-forest on aufs2-util with an extra commit to have more than one branch). With lookahead, one can anticipate how far down the merge point will be and squeeze the wood between two columns to give a more aesthetically pleasing result. Share Follow edited Mar 21, 2017 at 15:34 knpwrs 16k1212 gold badges6363 silver badges103103 bronze badges answered Feb 15, 2011 at 14:45 user611775user611775 1,34377 silver badges1111 bronze badges Add a comment  | 
I know that the history in Git is stored in a data structure called a DAG. I've heard about DFS and know it's somewhat related. I'm curious, how do programs such as git log --graph or hg graphlog draw the history? I always thought it's quite complicated to draw the lanes and everything in such a nice way. Could someone write some pseudo code that demonstrates it? note: I tried looking around Git or hg's code but it's very hard to follow and get a general idea of what's going on.
How does 'git log --graph' or 'hg graphlog' work?
The 'File name too long' is indeed an error coming from your system. It is not a restriction in Git. I don't think there's a way of testing the maximum branch name lengths of other systems, like GitHub's, without experimenting - although I don't see why you would want to know... . Source: the error mentioned is thrown on line 291 of branch.c. "File name too long" is the standard description for the ENAMETOOLONG error.
I want to understand what is maximum allowed size of a git branch name. I am trying to create some long names (as an experiment) so a name with 370 characters was valid, but 380 characters gave me fatal: Failed to lock ref for update: File name too long So the questions are: what is the maximum number of characters that can be in git branch name? Does it depend on the system? Is it possible to create long branch name in a repository that will be rejected on remote repository (i.e. Github)?
Max length of git branch name
7 One way to inspect the build (not to debug, sorry) is to send the build logs to another server on failure. Here is an example: after_failure - sudo tar -czf /tmp/build-${TRAVIS_BUILD_NUMBER}-logs.tgz your-application-logs/ - scp /tmp/build-${TRAVIS_BUILD_NUMBER}-logs.tgz [email protected]:~/logs You could send them via email, store them on a storage server or whatever. These logs would be useful to you if you run your tests in a debug mode and include our own logs as well in the tarball. Share Follow answered Feb 14, 2014 at 13:51 Harry DobrevHarry Dobrev 7,65622 gold badges4848 silver badges6666 bronze badges 4 7 I already check the logs on Travis, this is how I debug builds remotely, but fixing builds involves commiting blindly for intricate errors, and waiting for Travis servers. This is not ideal for complex build chains, hence my question about local debugging possibilities. – BenC Feb 14, 2014 at 14:15 So you're left with reducing the problem instead of finding a solution. Try to minimize the build time and build steps (you could divide the project into separate repos with separate Travis builds). Try to have a dev environment very similar to that on Travis. – Harry Dobrev Feb 14, 2014 at 14:27 This is why having virtual machines with Travis systems is a nice way to debug builds locally. This was possible, but not anymore, unless you are ready to replicate the exact system on another VM (e.g. Virtualbox). – BenC Feb 14, 2014 at 14:42 @BenC You could use their cookbooks with whatever VM you prefer. github.com/travis-ci/travis-cookbooks – Harry Dobrev Feb 14, 2014 at 14:44 Add a comment  | 
One used to be able to download Vagrant boxes to debug Travis builds (for GitHub projects for instance). Apparently, this is no longer possible, so how do people currently debug complex Travis build chains locally?
What is the current workflow to debug Travis builds locally?
According to your logs, this seems to be due to case sensitivity: you show the repository to contain src/WebClient (camel cased!), but then you try to cd src/webclient (lowercase). On macOS, this would work because the filesystem is by default case insensitive; not sure why it works on your Ubuntu system, unless you use something like tab completion, which does the casing for you. To check what you have in your subdirectories, you can run find src instead of ls -la to see the whole directory tree in src.
I am trying to test out Github Actions for a small web project. I have two projects in the repository, and I want to create a deployment script for only the web client. The repository looks like this: root | |-src | |-API | | | |-WebClient | |-docs I want to run scripts in the WebClient directory. When I try to cd into ./src/webclient, I get the error no such file or directory name: CI on: push: branches: [ master ] pull_request: branches: [ master ] jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Setup Node.js environment uses: actions/[email protected] - name: Open Web Client Directory run: | ls -la cd ./src/webclient ls -la - name: Run a multi-line script run: | echo Add other actions to build, echo test, and deploy your project. ls -la The output for the "Open Web Client Directory" step: total 28 drwxr-xr-x 5 runner docker 4096 Oct 17 18:05 . drwxr-xr-x 3 runner docker 4096 Oct 17 18:05 .. drwxr-xr-x 8 runner docker 4096 Oct 17 18:05 .git drwxr-xr-x 3 runner docker 4096 Oct 17 18:05 .github -rw-r--r-- 1 runner docker 6215 Oct 17 18:05 .gitignore drwxr-xr-x 4 runner docker 4096 Oct 17 18:05 src /home/runner/work/_temp/43164e53-98ec-41c2-8773-72e94c3453e5.sh: line 2: cd: ./src/webclient: No such file or directory Error: Process completed with exit code 1. It looks to be successfully doing the ls -la command, but fails to find the directory ./src/webclient. Is there something obvious that I am missing? I have tried changing the command to cd src/webclient, and it fails also. This works on two different local machines, one ubuntu and one MacOS.
Github Actions - No Such File or Directory on Any Run Step
I initially tried to use Respost, but it doesn't allow setting a raw body string. So here's a way to do it with curl. In a .github/workflows/whatever.yml: name: Some workflow on: issue_comment: types: [created] jobs: comment: if: contains(github.event.comment.body, 'special string') runs-on: ubuntu-latest steps: - name: Add comment to PR env: URL: ${{ github.event.issue.comments_url }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | curl \ -X POST \ $URL \ -H "Content-Type: application/json" \ -H "Authorization: token $GITHUB_TOKEN" \ --data '{ "body": "blah blah" }'
I am trying to get a regular comment inserted in a pull request from a GitHub action. I can't seem to get it right. Octokit, the underlying library, allows you to create reviewComments to PRs, but those refer to a commit and that's not what I want, I want a simple comment. I figured I can just use octokit.issues.createComment. However, that does not seem to work. Here's the code import * as core from '@actions/core'; const {GitHub, context} = require('@actions/github') const parse = require('parse-diff') async function run() { try { // get information on everything const token = core.getInput('github-token', {required: true}) const github = new GitHub(token, {} ) console.log( context ) const PR_number = context.payload.pull_request.number // Check if the body contains required string const bodyContains = core.getInput('bodyContains') if ( context.payload.pull_request.body.indexOf( bodyContains) < 0 ) { core.setFailed("The body of the PR does not contain " + bodyContains); console.log( "Actor " + context.actor + " pr number " PR_number) const result = await github.issues.createComment({ owner: context.actor, repo: context.payload.repository.full_name, issue_number: PR_number, body: "We need to have the word " + bodyContains + " in the body of the pull request" }); console.log(result) } // more irrelevant stuff below }} This simply seems to retur "Not found". I can't seem to be able to find out if it's a type problem, or something different. Theoretically, owner, repo, and issue number, as well as body, should be right, and it's printed correctly. Any help will be appreciated. This is probably a more general question in the realm of GitHub API, with GitHub actions being simply the context, so I might be wrong there.
Commenting a pull request in a GitHub action
I wrote a JavaScript library to do that: github-calendar. Here is an example how to use it: <!-- Prepare a container for your calendar. --> <script src="https://cdn.rawgit.com/IonicaBizau/github-calendar/gh-pages/dist/github-calendar.min.js" > </script> <!-- Optionally, include the theme (if you don't want to struggle to write the CSS) --> <link rel="stylesheet" href="https://cdn.rawgit.com/IonicaBizau/github-calendar/gh-pages/dist/github-calendar.css" /> <!-- Prepare a container for your calendar. --> <div class="calendar"> <!-- Loading stuff --> Loading the data just for you. </div> <script> new GitHubCalendar(".calendar", "your-username"); </script> Here you can see it in action: Basically, since we need cross domain requests we need a proxy. It makes a request to GitHub profile page (github.com/<user>) and then brings back the needed stuff from there. For more information, check out the documentation on GitHub.
Is there a way to embed the Github contributions graph in HTML5?
Embed Github contributions graph in website
If you prefer to use a GUI to create the keys Use Putty Gen to generate a key Export the key as an open SSH key As mentioned by @VonC create the .ssh directory and then you can drop the private and public keys in there Or use a GUI program (like Tortoise Git) to use the SSH keys For a walkthrough on putty gen for the above steps, please see http://ask-leo.com/how_do_i_create_and_use_public_keys_with_ssh.html
i just started a Git tutorial and I get to a deadend: I try to generate a rsa key part and it fails. I did this, in git bash: ssh-keygen -t rsa -C "[email protected]" And i got this: Generating public/private rsa key pair. Enter file in which to save the key (/c/Users/Eva/.ssh/id_rsa): enter passphrase: enter same passphrase again: open /c/Users/Eva/.ssh/id_rsa failed: no such file or directory. Saving the key failed:/c/Users/Eva/.ssh/id_rsa. I tried to save in a different folder and it went OK. but now i do the command ssh -T [email protected] and it gives me the error permisson denied (publickey).
Saving ssh key fails
It happens because Sourcetree didn't get some private access from Github while authenticating. So the solution is very simple. Login to your Github account on any browser. From the top right corner select SETTINGS. Now select DEVELOPER SETTINGS. From DEVELOPER SETTINGS select PERSONAL ACCESS TOKEN. Now from PERSONAL ACCESS TOKEN select GENERATE TOKEN. Fill Note as Sourcetree and Check All Scopes from the checkbox as shown in the below screenshots. After Click on Generate Token. Now Open Sourcetree. Click on Options in Tools menu & Click add Account. Select options as shown below screenshot. Enter username as your Github account username and password as Generated Token from Github. Click on SAVE now you might see all your repository are visible and can clone too. Hope it helps.
A similar issue is described here however, my symptoms are a little different and none of the steps there seemed to work. Nor does the suggestion here work. I'm attempting to use SourceTree to clone a private repo belonging to github organization of which I am a part. I have full permissions to view and commit to the repo, I can see it online when I log in, AND I can clone just fine with the command line and also via the github desktop application. It only fails in SourceTree. Further, it is not bad credentials or anything like that, because I can clone, commit and push to my other non-private repos on github using SourceTree with my github credentials. From the "Clone a Repository" dialog I enter the source URL, which looks something like this: https://github.com/MyOrgName/reponame.git I tab off of that field and it populates the destination path and name fields, but at the bottom of the dialog is a yellow exclamation point with this error: This is not a valid source path / URL If I click the error message, it brings up the "Details" dialog, which states the following (twice for some reason): remote: Repository not found. fatal: repository 'https://github.com/MyOrgName/reponame.git/' not found remote: Repository not found. fatal: repository 'https://github.com/MyOrgName/reponame.git/' not found I have also tried this by adding my username to the url like so: https://[email protected]/MyOrgName/reponame.git but no luck there either.
Can't clone private repo on github from SourceTree
GitHub repos aren't web hosting, you should push that stuff up to a service specifically designed to serve files, like pages.github.com.
I've got a repository on github with a .css file in it. Is there any way to have github serve this file in a way that I can consume it in a web page? In other words, I'd like to be able to reference this source file at github directly, from an HTML file on my local computer or a live domain. Something like: <link rel="stylesheet" type="text/css" href="http://github.com/foouser/barproject/master/xenu-is-my-lover.css" /> I've tried including a<link> to the "raw" source file (http://raw.github.com...), but github serves its Content-Type as text/plain, and consequently, Chrome and FF are not adding its content as CSS styles to the page—the file's data is being discarded and a warning is shown in the debugger consoles of the browsers.
Referencing a .css file in github repo as stylesheet in a .html file
Ask for the username of the person you're adding as a collaborator. If they don't have one, they can sign up for GitHub. In the top right corner of any page, click your username. On your profile page, click the Repositories tab, then click the name of your repository. In your repository's right sidebar, click Settings. Click the "Collaborators" tab. Start typing the collaborator's username. Select the user from the drop-down menu. Click Add.
My project has quite a few people and I want to give them all push & pull access because right now, they forked the project and when they make changes, they have to push to their fork and send me a pull request. Instead, I want them to be able to clone the main project at myusername/project and be able to push to it automatically. So how would I do that?
Git how to give people push access that needs to be merged in by organizers?
I asked GitHub Support, this was their response (emphasis mine): We use a separate ref namespace for all Pull Requests which we use for various things including restoring the branch. Since we keep those [Pull Request] refs indefinitely, there's no time limit on restoring a branch. You can see these special references in your remote by using the following: $ git ls-remote | grep pull From [email protected]:<username>/<remote>.git aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa refs/pull/1/head bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb refs/pull/1/merge cccccccccccccccccccccccccccccccccccccccc refs/pull/2/head dddddddddddddddddddddddddddddddddddddddd refs/pull/2/merge The references are namespaced under refs/pull/<pull request number>/. The head reference points at the tip of the branch that's being pull requested, i.e. the last commit on the branch. I'm not sure what the merge reference is though.
This is not a question on how to restore lost branches in Github, but rather how long you have to restore a deleted branch through the following user case story: Within a pull request (often used as a place for code review) the branch can be merged and then deleted, all in the github GUI. Should you choose to delete it, you are given the option with a bold and underlined word, to "restore" the branch. I suspect this option has a time limit and that github doesn't keep this available indefinitely. Does github have a time limit on how long you can do this? If it does, what is that time limit?
For how long can you restore/recover a deleted branch on GitHub?
pip searches for the library in the Python package index. Your version is newer than the newest one in there, so pip won't update it. You'll have to reinstall from Git: $ pip install git+git://github.com/scikit-learn/scikit-learn@main
I installed scikit-learn from GitHub a couple of weeks ago: pip install git+git://github.com/scikit-learn/scikit-learn@master I went to GitHub and there have been several changes to the master branch since then. How can I update my local installation of scikit-learn? I tried pip install scikit-learn --upgrade but I got: Requirement already up-to-date Cleaning up ...
pip: pulling updates from remote git repository
You can't host a python application on Github pages, it's designed for simple static file hosting. You could use something like Flask-Frozen to turn your Flask application into static pages, but then you obviously have some big tradeoffs depending on your site's functionality.
Recently I have been trying to create a personal website using a Flask app with Github pages. Once creating a repository titled .github.io and placing an a file titled index.html it will appear live at the address .github.io. However, once this file is deleted and replaced with a basic Flask application then a 404 page appears. What is required to get a Flask app running on Github pages?
What is required to get a Flask app running on Github pages?
Milestones are only closed manually. You can close a milestone by clicking the "close" link in the list of milestones. Note that for some reason, there is no "close" button in the milestone's details page, only in the list page of milestones.
How do I close/complete milestones on GitHub projects? I've already three milestones that are "overdue" but they are completed already. I simply don't know how to mark them "completed" - can anyone help me? I already tried to Google this issue, and browsed the GitHub help pages, but couldn't find any information on using milestones.
How to complete a milestone on GitHub?
52 You can leverage the GitHub Events API to perform such task and retrieve a JSON formatted response. The Events API is a read-only interface to all the event types that power the various activity streams on GitHub. syntax: GET /users/:user/events example: https://api.github.com/users/mojombo/events An alternative way is to subscribe to the public RSS feed of a user. For instance, Mojombo's public feed Url would be https://github.com/mojombo.atom Also If you want to view Full activities performed by all contributors ,you can also go to If Private https://github.com/orgs/YOURORGANISATION/dashboard If Public https://github.com/REPOSITORYOWNER?tab=activity Share Follow edited Nov 25, 2016 at 15:36 AnV 2,80433 gold badges3333 silver badges4545 bronze badges answered Feb 3, 2012 at 12:52 nulltokennulltoken 65.8k2020 gold badges140140 silver badges131131 bronze badges 14 1 These only seem to provide the same truncated list as github.com/motumbo?tab=activity – Sparr Feb 9, 2015 at 5:42 7 Tack on ?page=2 etc. – u01jmg3 Feb 20, 2015 at 14:30 4 @u01jmg3, your comment should be the answer ?tab=activity&page=2, too bad it's closed! – Jon49 Jun 17, 2015 at 16:48 2 A potential alternative would be to query githubarchive.org data which stores all public github events from 2011-12-02 – nulltoken Sep 3, 2015 at 14:58 5 Unfortunately, the ?tab=activity is gone since a few days, it there a replacement? I used this link every day, and now I cannot find my own comments on github any more. Is there another page for the activity now? (apart from the .atom feed)? – rubo77 Sep 22, 2016 at 22:09  |  Show 9 more comments
Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 12 years ago. Improve this question How can I view the entire activities of an user in github.com . Say Mr.Geos entire activites Mr.Geo pushed to .. Mr.Geo deleted ... ...
View entire activities of an user in github [closed]
You don't login to Git. You do login to a Git repository hosting server, which requests an authentication, but Git itself has no authentication nor authorization. (As an example of a Git repository hosting service offering login: GitHub: gh auth login GitLab: glab auth login) What Git does have is credential caching (check the output of git config credential helper) On Mac: "Updating credentials from the OSX Keychain": you can check if your old user was stored there, and update it. If you really want to disable the credential helper, you will be asked your credentials every time you push to a repository hosted on a server requesting authentication. Regarding AgilePro's answer: Again, there is no way to ask git to log in, instead you have to make a bogus change and then try to push the change to get it to prompt you to log in. Not true. Git itself does not log you in, as mentioned in my answer above. A third-party CLI tool (like GitHub CLI gh) can connect to a repository hosting service (like github.com) and trigger the authentication. No repository needed. With GitHub: create first through the Web UI a Personal access tokens (classic), with minimum required scopes: repo, read:org, and gist. Its token prefix will be ghp_.... Then authenticate yourself from the command-line, after installing gh, using gh auth login glab auth login0 You can enter your GitHub user account name, and your token. Then, a glab auth login1 would give you: glab auth login2 You are authenticated (to GitHub, not to "Git"). You can also register your token with the local credential manager: glab auth login3 This is purely for safekeeping, and does not authenticate you.
I need to change who git thinks I am so I can push to a different repo ( both are mine. ). Here is a similar issue but I don't want to set any config variables. I just want to login once to my current username. I plan on deleting my other account. Here is the error when I attempt a git push origin master remote: Permission to current_user/fav-front.git denied to user_to_delete. fatal: unable to access 'https://github.com/current_user/repo.git/': The requested URL returned error: 403 Please note that the git config variables for user and email ( user.name and user.email ) are not related to the authentication that git push uses. They are used for commits. To reiterate, I want to login to git as current user.
How can I "login" to git?
On the repository page there is commits button below the Big Green Pull-Down Code button to see all commits. Clicking on it will open all the history
I am looking for the history button on gitHub for all the past git commits. These are buttons on the gitHub page. Code Issues Pull requests Actions Projects Wiki Security Insights Settings 1 branch 0 tags
Where can I see the commit history on the gitHub website?
And.. they fixed it! See GitHub's blog on squashing your merge commits If you go to the settings for your repository, you'll see a "Merge Button" section (under Options). It will have 2 buttons available: Allow merge commits Add all commits from the head branch to the base branch with a merge commit. and Allow squash merging Combine all commits from the head branch into a single commit in the base branch. If you uncheck the first option (and left the Allow squash merging checked), PR "merges" will result in rebase and squashes.
The "This pull request can be automatically merged [Merge pull request]" button in github is great -- except that it creates merge bubbles. Is there a way to use this button/functionality in github without it creating merge bubbles?
Automatic merge of pull requests on Github without the merge bubble
There are a few things going on here. In your _layouts/default.html file (and any of the other _layouts directory files for that matter), instead of: {{ page.content }} you need to use: {{ content }} Jekyll only lets you includes files from a site root level _includes directory. So, you need to move your content.md from the root to that directory (making it if it doesn't already exist). Finally, you need to actually make the call to the include file from your index.html file. This can be done by changing the content of your index.html file to: --- layout: default --- {% include content.md %} That will setup the behavior you are looking for. I'd point out two other things: You may find that changing the extension of your index file from .html to .md works better. An important note though: you need to use .html if you want pagination. Per the Jekyll Pagination documentation, that feature only works when the file is named _layouts0. If all you are doing in your index file is calling an include that only resides on that page, you might be just as well off simply putting the content directly in the index file.
I'm probably missing something simple but I have no way to test Jekyll locally. I'm using GitHub pages to render Jekyll, for starters I only want to render markdown content on the main index.html from one markdown page. The structure is: Index.html --- layout: default --- _layouts - default.html //html stuff.. <section> {{page.content}} </section> In root folder I have a page called content.md that I wish to render for {{page.content}} the layout renders but the liquid tags section is blank. How do I render content.md? Example: https://github.com/wycks/wordpress-gears-jekyll
How to render a Jekyll markdown page on sites index
Answer for 2017: Use lein-voom You can use lein-voom to pull and build project dependencies from GitHub or other Git repositories. It works by letting you annotate your dependence vector-pair entries with voom-specific meta data. Here's an example from the README: ^{:voom {:repo "https://github.com/ring-clojure/ring" :branch "1.3"}} [ring/ring-core "1.3.0-RC1-20140519_142204-gaf0379b"] The main use case given for voom is allowing teams that maintain multiple Clojure projects in separate Git repositories to easily depend on the current version of one or more of the projects from another without having to constantly deploy development snapshot releases. I prefer lein-voom over lein-git-deps (the plugin recommended in the previously-accepted answer from 2012) for a few reasons: The fact that the specification is given through meta-data makes this plugin more flexible and easily extensible. It already has an option for specifying a specific branch/tag of the repository. You could add other key/value pairs to the map for additional fine-grained control without too much work. You can simply delete the meta-data from your dependence entry for stable releases; i.e., there's no need to move entries around / refactor your project.clj once your dependence moves from GitHub into Clojars. At the time of writing (November 2017), lein-voom has been updated in the past couple of months, whereas lein-git-deps has been stagnant for 4 years.
Is it possible to have leiningen pull a project directly from a git repository (on github) as a dependency? Using Bundler with Ruby, it is possible to map a gem to a git repo, allowing for rapid development and integration of dependent projects. Update Based on the accepted answer, there is now a leiningen plugin for managing git-deps: https://github.com/tobyhede/lein-git-deps
clojure and leiningen - using a git repository as dependency
From the blog post you linked, I can see at least one benefit of tokens over SSH keys: while tokens and SSH keys both share the Unique, Revocable, and Random benefits quoted in the blog post below, tokens are also Limited in comparison to SSH keys in that they come with their own scoped permissions baked in: While SSH keys can be read-only or read-write enabled, or scoped to specific repositories, personal access tokens do have an edge in terms of their finer-grained permissions model in comparison. This is likely why GitHub recommends tokens over SSH keys. Tokens offer a number of security benefits over password-based authentication: Unique – tokens are specific to GitHub and can be generated per use or per device Revocable – tokens can can be individually revoked at any time without needing to update unaffected credentials Limited – tokens can be narrowly scoped to allow only the access necessary for the use case Random – tokens are not subject to the types of dictionary or brute force attempts that simpler passwords that you need to remember or enter regularly might be
I recently started getting notifications about the GitHub deprecation of basic authentication using a password to Git - see their blog post https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/. In this post, they say the following: For developers, if you are using a password to authenticate Git operations with GitHub.com today, you must begin using a personal access token over HTTPS (recommended) or SSH key by August 13, 2021, to avoid disruption. A short while ago, I started using SSH keys on some of the machines I use anyway to avoid entering my password regularly or storing it unencrypted with credential helper. However, as per above, they say personal access tokens are "recommended". What I would like to know is what are the key differences between each of these methods? This is to get some insight into why tokens are "recommended" and whether it is worth switching to this method of authentication.
In what ways is an SSH Key different from tokens for git authentication?
23 You can run git rebase --abort to completely undo the rebase. Git will return you to your branch's state as it was before git rebase was called. You can run git rebase --skip to completely skip the commit. That means that none of the changes introduced by the problematic commit will be included. It is very rare that you would choose this option. You can fix the conflict. Failing that, you should re-create your branch or you can be able to remove the .git/rebase-merge directory, which contains the rebase state. Share Follow edited Aug 24, 2017 at 15:46 Yoh Deadfall 2,75177 gold badges2929 silver badges3232 bronze badges answered Aug 24, 2017 at 15:26 Slim KTARISlim KTARI 29422 silver badges99 bronze badges 2 2 I'm not sure the third point (fix the conflict) applies. OP has already fixed the conflict, the error message appears after running git rebase --continue – quiram Feb 4, 2019 at 9:50 ` % git rebase --skip :( git: builtin/am.c:1981: am_skip: Assertion !is_null_oid(&state->orig_commit)' failed. error: am died of signal 6 – user7610 May 20, 2020 at 10:15 Add a comment  | 
I'm trying to rebase the work of a colleague. First, I get a ton of conflicts where <<<<< head seams to contain the new code. Then after a while I get the following error: fatal: update_ref failed for ref 'refs/heads/dev_504': cannot lock ref 'refs/heads/dev_504': ref refs/heads/dev_504 is at XXXXXXX but expected XXXXXXXX Could not move back to refs/heads/dev_504 Then if I try to continue anyway I get the following error: fatal: cannot resume: .git/rebase-apply/final-commit does not exist. How can I fix this so the rebase won't give an error?
Git rebase failing
Try git push origin mybranch This pushes your branch named mybranch to the remote named origin
I could use a hand with learning how to push a local branch to a remote branch. Please see below. Help much appreciated! The local branch was created after cloning the repo then doing $ git checkout -b mybranch remotes/origin/mybranch $ git branch -a master * mybranch remotes/origin/HEAD -> origin/master remotes/origin/master remotes/origin/mybranch But when trying to push changes back up: $ git push mybranch mybranch fatal: 'mybranch' does not appear to be a git repository fatal: The remote end hung up unexpectedly $ git push remotes/origin/mybranch mybranch fatal: 'mybranch' does not appear to be a git repository fatal: The remote end hung up unexpectedly $ git push origin/mybranch mybranch fatal: 'mybranch' does not appear to be a git repository fatal: The remote end hung up unexpectedly
pushing to git remote branch
100 I'm using git(2.12.2) 64-bit on Windows 10. My solution is simply close the login window which you have to type account and password, and a SSh window will pop out, then you type your password. Share Follow answered Mar 30, 2017 at 9:50 Shin-Bang TsaiShin-Bang Tsai 1,10311 gold badge88 silver badges1010 bronze badges 6 1 That helped. Seems it is an issue with the Git Credential Manager for Windows. – Sanjay Karia Apr 17, 2017 at 16:18 Wooow! I've never thought closing the credential manager pop-up window. You are awesome man, Thanks! – Aram Tchekrekjian May 13, 2017 at 9:28 4 how can something as important as login be broken? – Ringo May 20, 2017 at 0:09 Strange fix but it works. If you click cancel on the first time you get asked for a password you will get a window with the exact same appearance, just type your correct password and it should work. Thanks Shin-Bang Tsai – csalmeida Aug 18, 2017 at 10:46 Can't believe it - but it worked... I wasted like an hour on this – ilans Sep 17, 2017 at 21:30  |  Show 1 more comment
I'm trying to clone my git repo from bitbucket, and when I enter this command: git clone https://[email protected]/naor_shoyhat/hello-world.git The bash then prompts me a window with areas to enter username and password. I enter them and then I receive this error: remote: Empty password fatal: Authentication failed for 'https://[email protected]/naor_shoyhat/hello-world.git/'
Git error remote: Empty password
Go to your project directory and delete hidding .git folder like shown below you will be disconnected to git.
I'm using git with android studio and I already sync other repository. But I hope to change a git repository like github. I think I need to disconnect already connected to the repository but I don't found this option. To do that, How can I do?
How to change git repository using android studio
While it's not the end of the world if you commit GoogleService-Info.plist (similarly, on Android, google-services.json), you're better off leaving it out for one big reason: You're making it clear that others who build your code that they should be setting up their own Firebase project to host its configuration and data (because your project simply won't build with that file missing). Furthermore, if your project has world-writable resources in it, you can expect that people who get a hold of your app and config so easily will inadvertently start writing data into it, which is probably not what you want. Open source projects that require a Firebase setup should ideally have it stated in the readme that anyone who wants to work with this app needs to go through the process of setting up Firebase. The data in these config files is not exactly private - they can be extracted fairly easily from an IPA or Android APK. It's just probably not in your best interest to share them as part of your app's code.
I'm using Firebase for an iOS project that I want to open source. Should I add GoogleService-Info.plist to .gitignore before I upload I share the project on Github? I know it contains my API key, client id, etc., which might not be safe to expose?
Firebase: Should I add GoogleService-Info.plist to .gitignore?
Just in case anyone is interested, it can be done via GitHub's Menu Bar: Repository/Discard changes to selected files.
How to discard all changes in Github desktop (mac), comparing to the latest commit? It is possible to click on one file and select "discard changes". But how to discard all changes in files?
Discard all changes in Github Desktop (Mac)
62 I eventually found an answer by strich: on https://github.com/git-lfs/git-lfs/issues/911 I've had similar issues in the past and I think there may be a potential bug in cloning with git lfs (Still to be determined). You can try this method of fetching the repo, which is in fact faster too: // Skip smudge - We'll download binary files later in a faster batch git lfs install --skip-smudge // Do git clone here git clone ... // Fetch all the binary files in the new clone git lfs pull // Reinstate smudge git lfs install --force This only needs to be done once to initialize the clone for the first time. Please do test it and let me know if it fixes it. Share Follow edited Jan 16, 2021 at 11:26 ian 12.1k99 gold badges5353 silver badges108108 bronze badges answered Oct 2, 2017 at 9:54 Dan-DevDan-Dev 9,18033 gold badges3939 silver badges5656 bronze badges 5 2 I can't say I fixed this. Eventually I gave up as I got other errors. – Dan-Dev Oct 4, 2017 at 16:09 If you don't want to give up and re-download the whole repository, check this question: stackoverflow.com/questions/43989902/… (especially the answer about lfs.url configuration option). – Tomasz Gandor May 17, 2018 at 9:38 2 direct link to the github answer github.com/git-lfs/git-lfs/issues/911#issuecomment-169998792 – Deepak Bandela Jun 3, 2020 at 7:31 1 If you have submodules: git submodule foreach git lfs pull – vsp Mar 9, 2023 at 15:29 Tried this method. It got some file, but still failed to get some files, the repository may not be in a consistent state. It could be dangerous. – Kemin Zhou Jan 10 at 18:52 Add a comment  | 
I'm not sure if this is the right forum to discuss git-lfs but as we have a tag for it I'll post my question. I have read the "Troubleshoot Git LFS in Bitbucket" page. I'm getting the following error when runing: ssh-agent bash -c 'ssh-add /home/dan/.ssh/keyname; git clone [email protected]:[repo name removed].git' $ git-lfs smudge -- [Filename removed].zip Error downloading object: [Filename removed].zip ([code removed]): Smudge error: Error downloading [Filename removed].zip ([code removed]): [[code removed] Object does not exist on the server: [404] Object does not exist on the server [404] Object does not exist on the server github.com/git-lfs/git-lfs/errors.newWrappedError /tmp/docker_run/src/github.com/git-lfs/git-lfs/errors/types.go:170: [[code removed]] Object does not exist on the server github.com/git-lfs/git-lfs/errors.newWrappedError /tmp/docker_run/src/github.com/git-lfs/git-lfs/errors/types.go:170: Error downloading [Filename removed].zip ([code removed]) github.com/git-lfs/git-lfs/errors.newWrappedError /tmp/docker_run/src/github.com/git-lfs/git-lfs/errors/types.go:170: Smudge error Has anyone got any advice?
Smudge error: Error downloading
Figured out how to manually set my home directory in Windows XP: Right click "My Computer" Choose the "Advanced" tab Click the "Environmental Variables" button Under the "System variables" section, click "New" In the "Variable name" enter in "home". In the "Variable value" enter in the path to your profile. To do the same via command prompt do : setx HOME "your\path\to\home" ( Please note the suffix x - This is used to persist the change )
I'm trying to configure GIT on my Windows XP machine, but SSH keeps creating and looking for the public/private key pair in non-sensical places, e.g. /.ssh/id_rsa Is there a configuration file in the GIT Installation for Windows where I can switch this to my home directory, or another user defined place? By default, it offers to create new key pairs at //.ssh/id_rsa but that gives me the error "Could not create directory '//.ssh'." And when I'm able to find a directory I can create it in, GIT won't look there.
SSH is looking in the wrong place for the public/private key pair on Windows
You do not push amend to the remote repo. git commit --amend allows you to include all current staged changes to your last commit in the local repo, instead of creating a new commit. Let say you committed all changes but forgot to include a file include_me.js. You may run git add include_me.js, then git commit --amend to amend your last commit. As mentioned by knittl, if you amend an already-pushed commit, you have to force-push the branch. Beware, if anyone has pulled the branch before you force push, they will have to reset their local branch.
I learn Git and Using VSCode and just learn the commit "amend" command and now trying it on origin (GitHub). I can't find any way to do this. Do I need some external tool to do that I don't see any "push amend" from the Git menu in VSCode
Can I amend a commit made with VSCode to GitHub repo?
50 Since nobody wrote the answer from the comments for several months, I will quickly do so. There are 2 possible problems/solutions: id_rsa created with wrong user Create id_rsa as the jenkins user (see hudson cannot fetch from git repository) Leave passphrase empty Share Follow edited Jun 20, 2020 at 9:12 CommunityBot 111 silver badge answered Nov 14, 2012 at 1:35 Patrick BoosPatrick Boos 6,86933 gold badges3636 silver badges3636 bronze badges 5 Why does it matter which user creates the keypair? – Richard Jul 7, 2013 at 23:59 1 Because each user has his own .ssh folder where the keys are stored. The user jenkins connects to github with his own ssh key in ~/.ssh/id_rsa. If you create them with your own user, than jenkins won't be using them, but still his own ssh keys. – Patrick Boos Jul 8, 2013 at 1:52 1 That would have taken a while to figure out, but it's actually obvious once you think about it. Many thanks! – binarygiant Sep 4, 2013 at 22:11 Wouldn't it be sufficient to create id_rsa with another user, move it to the desired user's folder and set chown on it? – Tzen Aug 28, 2017 at 8:52 2 Leave passphrase empty solved it , with a passprase I got the above error,Thanks! – lukass77 Feb 7, 2020 at 14:20 Add a comment  | 
Here is my setup: Jenkins is running on my linux machine as 'jenkins' user. I have generated a ssh key-pair as described in Linux - Setup Git, for the 'jenkins' user. When I sudo su jenkins and try ssh -vT [email protected], I am always asked my passphrase, but I am always eventually authenicated. (the verbose option shows which key is used, among others). I could clone my repo from GitHub using jenkins: Thusly: jenkins@alpm:~/jobs/test git/workspace$ git pull Enter passphrase for key '/var/lib/jenkins/.ssh/id*_rsa': Already up-to-date. Up to this point I have followed the instructions to the letter. The problem is that the Jenkins job fails with the following error: status code 128: stdout: stderr: Permission denied (publickey). fatal: The remote end hung up unexpectedly This is same error as I get when I typo the passphrase (but of course, Jenkins does not ask me for the passphrase). The following pages: GitHub - SSH Issues Using SSH Agent Forwarding indicate to me that ssh-agent could help remember the passphrase, which it does when I am using my own user, but not the jenkins id. Note that while running as my normal user yields: echo "$SSH_AUTH_SOCK" /tmp/keyring-nQlwf9/ssh While running the same command as my 'jenkins' yields nothing (not even permission denied) My understanding of the problem is that the passphrase is not remembered. Do you have any idea? Shall I start a ssh-agent or key ring manager for the jenkins user? How? Or is ssh forwarding suitable when forwarding to the same machine? Any brighter idea? ps: I never sudo gitted, I always used jenkins or my user account (as mentioned in this SO post - Ubuntu/GitHub SSH Key Issue)
Permission denied (public key) during fetch from GitHub with Jenkins user on Ubuntu
You might need to set the path to your git executable in Manage Jenkins -> Configure System -> Git -> Git Installations -> Path to Git executable. For example, I was getting the same error in Windows. I had installed git with chocolatey, and got the location via Powershell: Get-Command git.exe | Select Definition In Unix, you should be able to do: which git
I am getting an error when inputting my repo location into the "Source Code Management > Git > Repository URL" section of a new Job. I have searched all around and tried many different URLs with no success. Error: Failed to connect to repository : Error performing command: git ls-remote -h https://github.com/micdoodle8/Crossbow_Mod_2.git HEAD Any ideas? Thanks.
"Failed to connect to repository" Error while setting up Github Jenkins Plugin
69 Try this: git config --global pack.windowMemory "32m" pack.windowMemory:: The maximum size of memory that is consumed by each thread in linkgit:git-pack-objects[1] for pack window memory when no limit is given on the command line. The value can be suffixed with "k", "m", or "g". When left unconfigured (or set explicitly to 0), there will be no limit. Share Follow edited Nov 29, 2022 at 6:20 Sridhar Sarnobat 24.3k1313 gold badges9696 silver badges109109 bronze badges answered Sep 22, 2014 at 1:45 asjerasjer 79155 silver badges44 bronze badges 5 ran into this problem on Cloud 9 workspace free account..Running this command worked! – NiRUS Jul 2, 2016 at 11:45 Had a pack-objects died of signal 952 after running the command "git repack -a -d -f --window=250 --depth=250" on a newly constructed svn to git conversion, this fixed that is well. THANKS! – James Eby May 16, 2017 at 15:26 2 Neither this nor git config --global pack.windowMemory "4096m" made any difference to me. – Sridhar Sarnobat Sep 28, 2021 at 23:19 This solved the problem on a tiny AWS t4g.nano instance I am using for testing. – paradroid May 25, 2022 at 20:05 Worked for me too. I was running out of space on a Raspberry pi due to a large .git folder. I ran this command and then git repack -a -d -f --depth=250 --window=250 the .git folder after plugging the SD card into a PC. It shrank the .git folder from 3 GB to 1GB. – mahela007 Mar 3 at 6:53 Add a comment  | 
I added some files to the repo, committed, and attempted to push to Github: $ git add . $ git commit -m 'bla' $ git push origin master I am getting an error when I try to push to Github. Counting objects: 84, done. Delta compression using up to 2 threads. error: pack-objects died of signal 9 error: failed to push some refs to '[email protected]:xxxxx/xxxxx.git' All was working fine before I went on vacation 2 weeks ago. Nothing has changed in the interim as far as I know. The config file seems to be fine. And git push -f also generates the same errors as above.
git error - can't push to github - pack-objects died of signal 9
Download the source: git clone https://github.com/thoughtbot/capybara-webkit.git Build the gem: cd capybara-webkit && gem build capybara-webkit.gemspec Install it (the filename/version may vary): sudo gem install capybara-webkit-0.14.1.gem
I want to install a ruby gem globally (sudo gem install capybara-webkit) but I want it to be installed from the master in its github repository. I know this can be done using bundler but I want to do it from the command line because I'm coding mainly using pry.
Install ruby gem globally from github repository
You can also clone wiki via ssh : git clone [email protected]:YOUR_USERNAME/YOUR_REPOSITORY.wiki.git
I just created a Wiki for a Github repo, and cloned it to my desktop. There is only the option to clone using https, which means every time I try to push git asks me for my username and password. Is there some way to use SSH in a Github Wiki as I do with all my standard repos? I checked the Wiki help but couldn't find anything there. I' using 2FA in Github by the way.
Is it possible to access a Github Wiki via SSH?
The release branch that you create is a short lived one, similar to the feature branches that you create. Once the release is finished, you delete the branch. For example, I would create a release/0.1.0 branch, do the work, and then merge. When deploying to production, I always take the code from the master branch, meaning that I merge the release branch into master first, before deploying. GitFlow is more about moving forward, not back. Hence why hotfixes are used to create fixes for issues that are identified. In terms of time taken to get into Production, that is really not a concern of GitFlow, and i don't think it will provide much help in this area. This would be an issue for you regardless of which branching strategy you use.
Learning GitFlow and I have some concerns that I don't see addressed in any of the docs/articles I've read about it. At some point code on the develop branch needs to be deployed to a QA/staging environment and tested rigorously. So with GitFlow you cut a release branch off of develop, and then you deploy release to said staging environment. First, just wanted to clarify something real quick: the very first time a particular project/repo goes through this process, you'll actually be forking/creating this new release branch from develop, yes? And that all other times in the future, you're simply merging develop into release, yes? So then QA tests the release branch on the staging env, all looks good, and we're ready to deploy to prod. Do you: Deploy to prod and then merge release into release0? ; or Merge release1 to release2 and then deploy to prod? I ask because it seems like in the former case you would need to deploy the release3 branch to prod, then deploy to prod, and then merge to release4. Which sounds OK, but often prod and non-prod environments are not identical and code that runs perfectly fine in staging chokes the second it fires up on prod servers. I know GitFlow supports the concepts of hotfix branches but they are reserved for minor fixes. In the case of a complicated fix that requires a rollback/backout release, we now have "dirty code" (code that breaks prod for some reason) merged into release5. And in the latter case, it might take hours or even days (especially if you need to involve IT/Ops to do prod deploys) from the time you merge and put in the prod release request in, to the time the prod deploy actually occurs. And during this time you have a release6 branch that says "features X, Y and Z are in prod" but they are actually not. I'm wondering if GitFlow actually solves this somehow or what the known workarounds to either case are.
GitFlow: merge to master first or after prod release?
These kinds of problems occur when you use sudo to run commands with side effects such as file creation. It's quite common to find files and directories in your home directory that are owned by root. In this case it seems your .git/config file is owned by root and thus gives you the permissions error when you try to lock it. sudo chown bhishan -R .git from the ~/Copy/try directory should fix the permissions issue.
i created a folder called "try" in the path /home/bhishan/Copy/try then inside that folder i gave some commands: my commands are follwing: curl -s -O \ http://github-media-downloads.s3.amazonaws.com/osx/git-credential-osxkeychain chmod u+x git-credential-osxkeychain sudo mv git-credential-osxkeychain `dirname \`which git\`` git config --global credential.helper osxkeychain git init git remote add origin https: git remote add origin https: git push origin master ============================== it worked fine but, when i try to delete try folder i cannot delete the folder. i also can not give command: git init inside the try folder ( i have a .git folder there) ===================================================== my command line and error report is this: bhishan@bhishan-HP-Pavilion-dv6-Notebook-PC:~/Copy/try$ git init error: could not lock config file /home/bhishan/Copy/try/.git/config: Permission denied now, my question is how can i delete the folder called "try" ?
error: could not lock config file filepath/../.git/config :permission denied
40 This is how I have managed to install dependencies from private GitHub repositories. Dependencies in package.json can be added as follows. The github: prefix is optional. Specifying the #branch or #tag is also optional. "dependencies": { ... "myrepo": "username/myrepo#master", "myotherrepo": "github:username/myotherrepo" }, Here is an example workflow. PAT is a repo scoped Personal Access Token. It is important to disable persisted credentials on actions/checkout, otherwise they will override your PAT. Note that the git config change persists between steps so you only need to run it once per job. - uses: actions/checkout@v2 with: persist-credentials: false - uses: actions/setup-node@v1 with: node-version: 12.x - run: git config --global url."https://${{ secrets.PAT }}@github.com/".insteadOf ssh://[email protected]/ - run: npm ci ... Share Follow edited Jun 1, 2020 at 1:45 answered Jun 1, 2020 at 1:40 peterevanspeterevans 37.6k99 gold badges8888 silver badges8383 bronze badges 7 2 works like a charm, this is very useful in case a project has modules but the source is github private repos and not NPM – Allloush Oct 26, 2020 at 8:00 prefixing a package with #branch0 doesn't work at all – Alexander Ciesielski Nov 6, 2020 at 16:37 Thanks! that work like a charm, including the #branch1 prefix. I will also mention that one needs to create the #branch2 secret in the repository secrets – Assaf Sapir May 19, 2021 at 6:28 1 I followed this and it says #branch3 – Himakar Reddy Jan 25, 2023 at 18:18 2 #branch4 This worked for me. – Himakar Reddy Jan 25, 2023 at 22:51  |  Show 2 more comments
I am trying to run a build for a Node.js project using GitHub Actions. As part of the npm install, I need to install an npm module directly from a private GitHub repository (not from GPR!). In the package.json I have: "dependencies": { ... "my-module": "github:<org>/<my-module>#master", ... }, However, when running npm install, I get: npm ERR! [email protected]: Permission denied (publickey). npm ERR! fatal: Could not read from remote repository. The repository is part of my own organization, and locally (i.e. from my machine) it works. How can I make this run? I have already tried setting the NODE_AUTH_TOKEN environment variable, but it didn't make a difference. Although you find this suggestion quite often, it seems to only address GPR. What I would like to avoid is having to hardcode the token into the package.json file. Any thoughts on this?
Install an npm module from a private GitHub repository using GitHub Actions
MSYS is not the problem. Even if MSYS chmod doesn't work (it doesn't), Git has a built in way of getting around that problem, i.e. git update-index --chmod=+x. Let it be clear that git update-index only messes with the index (staging area), not the local repository (working directory). I am convinced the problem is with GitHub. On GitHub if a file is initially pushed with mode 100775, all is well. If a file is initially pushed as 100644 it causes a problem. Attempts to change the file mode will succeed with git add, succeed with git commit, succeed with git push, and even show up in the GitHub file history, but not be reflected on the "blob/master" page on GitHub. Update From: Petros Amiridis (GitHub Staff) Subject: How to change FIle Mode on GitHub? I have some good news. Our awesome team has just confirmed it is a caching bug on our end. Our team has deployed a fix.
$ git add test-file $ git commit -m 'first commit' create mode 100644 test-file $ git push $ git update-index --add --chmod=+x test-file $ git commit -m 'change mode' mode change 100644 => 100755 test-file $ git push After that if you go to GitHub it still shows as 100644 no matter what.
How to change the File Mode on GitHub?
Branches are first class citizens in Git. They are not "emulated" as branches like in older VCS such SVN, CVS, etc. If you really need three different directories, because you want to have three distinct development environment, make 3 clones: one in a directory called master one in a directory called imp_1 one in a directory called imp_2 But to really understand branches, you can read "Pros and cons of different branching models in DVCS". Or, since Git 2.5 (July 2015, 4 years after the OP's question), as I detailed in Multiple working directories with Git?, use git worktree. That will be one clone, multiple folders (one per branch). With Git 2.7+, you can then list those folders: $ git worktree list /path/to/bare-source (bare) /path/to/linked-worktree abcd1234 [master] /path/to/other-linked-worktree 1234abc (detached HEAD)
I'm rather new to git, and am trying to set up my repository the right way. Basically my app is a platform of sorts, so implementations of this platform are based on the master branch, but have some small modifications to those files as well as some additional files. I tried setting it up as branches, so I have a master branch, implementation_1 and implementation_2. But as far as I can tell, that would mean that locally all the branches are stored in one directory, with their separation being only through git. What I would like is to have 3 local directories, master,imp_1, and imp_2. If I make a change to one of the core files in the imp_1 directory, I want to be able to merge that change into the master branch and from there into imp_2. I'm beginning to think these need to be 3 different repositories (the implementations being forks of the core). Is that the way to go? In that case, how would I go about handling the above scenario?
Git - Store branches in separate local directories
You can do it like this: In your repo, git checkout -b new-branch Then pull User A's commits into your new-branch: git pull git://github.com/[User A]/[project-name].git After that, you can change it whatever you like in the new-branch. And when you test and satisfy with your changes, you can merge it into your master branch: git checkout master git merge new-branch OK, now you have your code with User A and your changes.
Is it possible to amend a pull request that someone else has started? Assume I maintain project X, and User A has sent me a pull request. There's some things I want changed before merging and can quickly do them myself. How can I do this simply and keep it all within one PR? Is this even possible?
Multi-user Github Pull Requests
4 You cannot import PDF as Readme, but I also don't see the point as it support the wonderful MD Language which can be seen easily with any device (also mobile). I have fixed the equations problem by using images. There is a nice website for that: http://mathurl.com/ Just type your latex equation and click "Make Math url" (bottom left button), the copy paste the image link (in red). I have used it in the wiki of github (but it should work the same with readme.md): https://github.com/scholi/pySPM/wiki/Mass-calibration Enjoy! Share Follow answered Jul 9, 2018 at 14:40 scholischoli 31422 silver badges1010 bronze badges 3 8 point is, I have a docx, with pictures, and converting to markdown just doesn't work. wasting too much time and failing – Gulzar Mar 22, 2020 at 23:27 Then maybe do your document as markdown and convert markdow to docx afterwards. Users really appreciate the fact to be able to see the readme without having to open a document, specially docx which can hold viruses – scholi Mar 23, 2020 at 17:40 githubs markdown files does not support equation libraries like KaTex. – Jonas Grønbek May 24, 2020 at 22:28 Add a comment  | 
I have a pdf file generated by latex which has many equations and what not. I want to use this pdf as the readme.md file in my github repo. How can I do this? Alternatively, is it possible to directly integrate the tex file in github and use that as a readme instead of the pdf version? Does github allow any integration with latex syntax as does gmail for example?
How can I use a pdf file as the readme in my github repo?
When you say "repo ID", do you mean the URL of the repo on GitHub? If that's what you're looking for, use git remote. plankton:~/scraps $ git remote -v origin [email protected]:petdance/scraps.git (fetch) origin [email protected]:petdance/scraps.git (push) If you have multiple remote repos feeding into your local repository, all of them will be listed there.
While I definitely am not the owner of this private repo, I have been using it as part of a group for a school project, and the teacher is simply asking for the Repo's ID when sending him emails concerning anything. I'm sorry if this is blatantly obvious to a lot of people, but for the life of me I could not find any clear notes on this via github or google. I am not using a GUI for my git, strictly through a linux shell. How do I find out the ID of the current Repo?
How does one find out one's own Repo ID?
I figured it out the issue. I already had a a personal github account linked to sourcetree. When i deleted the personal github account and added the work account it worked fine. Go to Tools -> Options Click on Authentication Tab Delete the other github account and add the new one
I just signed up for a github account at work and created a new repository. I ran a few git commands over command line and everything worked fine. 1. git init 2. git add . 3. git commit -m "first commit" 4. git remote add origin https://github.com/username/project.git Then, when I added the working copy from sourcetree and clicked the Fetch button, i get "error: Repository Not Found". I try push and pull and i get the same error. I've been using sourcetree with my bitbucket and github repositories for a few months now but i've never had this problem. Has anyone had similar issues?
SourceTree - git: fatal: remote error: Repository not found
To change your directory in git-bash to that specific path you can use this command : cd /c/user/myUsername basically you have to replace backslash with standard slash, or otherwise if you simply want to go to the parent directory you can use : cd .. as stated in comments that you already received on your question ...
I am using Git Bash and am trying a few things like making a 'commit' and 'push' to GitHub. I want to get out of the current directory C:\user\myUsername\app and land in the C:\user\myUsername folder. What commands do I write in Git Bash?
Get out of a folder using Git Bash
Your username shouldn't be an email address, but your GitHub user account: pete. And your password should be your GitHub account password (2014). Update 2021: your password should be (since Aug. 2021) a PAT (Personal Access Token). You actually can set your username directly in the remote url, in order for Git to request only your password: cd C:\Users\petey_000\rails_projects\first_app git remote set-url origin https://[email protected]/pete/first_app And you need to create the fist_app repo on GitHub first: make sure to create it completely empty, or, if you create it with an initial commit (including a README.md, a license file and a .gitignore file), then do a git pull first, before making your git push.
Why won't my git push? I created the repository and I keep getting this message: C:\Users\petey_000\rails_projects\first_app>git push -u github master Username for 'https://github.com': ***@gmail.com Password for 'https://***@[email protected]': remote: Repository not found. fatal: repository 'https://github.com/pete/first_app.git/' not found
remote: repository not found fatal: not found
1.Open GitHub Windows client. 2.Click tools (at the top of the window) and select 'Options'. 3.There you will find 'default storage location'. This is where Git Shell starts when you run it.
I downloaded and installed the programs offered by GitHub including Git Shell. The problem is that I want to set up the home directory of the Git Shell program to a custom one, but I don't know how to do that. I tried changing the "start in" field from the properties menu of the Git Shell shortcut but it didn't work. Can anybody please give me some information on how to change the home directory of the Git Shell to a custom one?
How to change git shell's start directory in windows 7
103 Just got hit by the same issue. It appears that you are using the url: http://056b05cb.ngrok.io/github-webhook Simply switch it to http://056b05cb.ngrok.io/github-webhook/ (notice the trailing /) If you hit the url without the / on a browser, it will get a 302 and the browser will simply redirect. But the webhook does not follow redirects, so it simply tells you what the response was, which was a 302 redirect. Share Follow edited Jul 26, 2018 at 20:18 answered Jul 26, 2018 at 18:38 bigosmallmbigosmallm 1,18611 gold badge88 silver badges66 bronze badges 7 5 It was exactly my issue! Thank you! – MingoVanBurne Mar 30, 2019 at 0:17 6 Jesus, what a nasty one. Thanks for this. I was scratching my head for a while – Laksitha Ranasingha Mar 25, 2020 at 18:31 1 Thanks for pointing it out! Wish it was documented better on jenkins/github integration side! – Chaitanya Bapat Apr 13, 2020 at 2:37 1 Damn. The guide I was going though had the slash too. Me: nahh I don't need it. smh. – Paul Samsotha Aug 23, 2021 at 3:58 Thank god I found this answer before I spent hours trying to figure this out! – Cesar Bielich Dec 4, 2021 at 17:18  |  Show 2 more comments
I set up localhost jenkins, using ngrok to expose my jenkins to github. I didn't set up any credentials. When I test delivery from webhook, it shows 302 not found. Response: Content-Length: 0 Date: Mon, 16 Apr 2018 02:09:22 GMT Location: http://056b05cb.ngrok.io/github-webhook/ Server: Jetty(9.4.z-SNAPSHOT) X-Content-Type-Options: nosniff Request: Headers Request URL: http://056b05cb.ngrok.io/github-webhook Request method: POST content-type: application/json Expect: User-Agent: GitHub-Hookshot/d5b13bc X-GitHub-Delivery: bdc31e52-4115-11e8-9e6b-c7d083151290 X-GitHub-Event: push Payload { "ref": "refs/heads/master", "before": "14e1265dc10ef64c93ee7791db7fa9ccef63279f", "after": "1f51b991d10af7c2b8fb4bc4c44417a57cf7bb56", "created": false, "deleted": false, "forced": false, "base_ref": null, ..... }
Github Webhook With Jenkins return 302 Found
From the source it looks like you can just specify user and password as part of your request object. Have you tried something like: r = Request.new({:user => "username", :password => "password"}) Also if you look down in the Shell section of the ReadMe it has an example of specifying it as part of restshell. $ restclient https://example.com user pass >> delete '/private/resource'
Does anyone know how to do basic authentication with RestClient? I need to create a private repository on GitHub through their RESTful API.
How do I do basic authentication with RestClient?
63 To fix this, if you got to the Team Explorer tab and click on the Manage Connections button (the green one a the top) you will see a list of local Git Repositories. Right click on the repository you want to stop tracking the storage.ide file on and select Open Command Prompt. You should then be able to type the following: git rm --cached -r .vs This removes the .vs folder and its contents and subdirectories from being tracked in git. Share Follow answered Oct 5, 2017 at 5:39 LiamLiam 5,20333 gold badges3030 silver badges4040 bronze badges 1 Perfect answer. – nmit026 Oct 22, 2017 at 1:26 Add a comment  | 
I upgraded VS 2017 to 15.3.0 a few days ago. Since then file "storage.ide" has remained in my modified files, even through I have used a suggested .gitignore for VS, which includes the .vs/ folder. This includes the following. # Visual Studio 2015 cache/options directory .vs/ I then added the following to be more specific about ignoring this from the list of files to be tracked .vs/SIASAWeb/v15/sqlite3/storage.ide .vs/**/storage.ide The Changes in the Team Explorer shows the following: <project folder> .vs/<project>/v15/sqlite3 storage.ide I have tried to git reset this file, but this then returns on the next commit, and also exists in all branches which I open, resulting in this then preventing the easy shift from one branch to another even if no changes were made. In the Solution Explorer the "applicationhost.config" and ".suo" files are marked as "ignored", but "storage.ide" is marked as "pending edit". I have tried committing, synced to the GitHub server, closing and re-opened VS, and even rebooting the computer. My question is why this file is being maintained as a modified file, even though it should be ignored for git.
Visual Studio 2017 15.3.0 git changes include "storage.ide" even though .vs/ in .gitignore
As it turns out, badge update/rendering is a slow process. After adding the badge to my README.md, I just started off with work in another branch. After about 10 minutes (at least in my case), the badge appeared but the pipeline status was shown as 'unknown'. It updated again after about 10 minutes and with the correct pipeline status ('passing' in my case). So, once you are done, just continue with your other stuff and it will update on its own, in sometime. Hope this helps someone!
Does GitHub have an official 'badge' for their new 'actions' feature? I came across this request on their official repo and there seems to be an official one: https://github.com/{github_id}/{repository}/workflows/{workflow_name}/badge.svg as per this comment, but I am unable to get it to work. Is it actually working? When I use it, I get the below output: Note that I have replaced {github_id} with my username, {repository} with my repo name and {workflow_name} with the corresponding workflow name (removing the curly braces). Does anyone else have this issue? Edit: I am working on a private repo, in case it makes a difference.
Official badge for GitHub actions
28 Much simpler, as I explained in "How to sign out in Git Bash console in Windows?": git credential-manager erase <url> Here git credential-manager erase https://github.com No need to remove the credential helper which is practical for caching user's password. Or (replace xxx wit the output of git config --global credential.helper): printf "protocol=https\nhost=github.com" | git-credential-xxx erase # Windows (2020-2021) printf "protocol=https\nhost=github.com" | git-credential-manager-core erase # Linux printf "protocol=https\nhost=github.com" | git-credential-libsecret erase # MacOs printf "protocol=https\nhost=github.com" | git-credential-osxkeychain erase Share Follow edited Apr 5, 2022 at 15:32 answered Jan 17, 2017 at 5:36 VonCVonC 1.3m539539 gold badges4.6k4.6k silver badges5.4k5.4k bronze badges 0 Add a comment  | 
This question already has answers here: Configuring user and password with Git Bash (14 answers) Closed last month. I have weird problem with Git bash. I have two Github accounts, let's say A and B. I set my name and email, like in account A: git config --global user.name git config --global user.email I initialized new repo, did a commit, then push and git bash asked me about login and password to github. By mistake I put login and password for account B! I logged in successfully, but there is no repository I just initialized. How can I logout and login to different github account? It's not user.name nor user.email
How to change git account in Git bash? [duplicate]
The credentials asked for, are the credentials for the repo you are trying to access, not for your Gitkraken account, which is very confusing. If you are using visualstudio.com, you would have to generate Git credentials. Do this by browsing to your project, click 'Code' and then on the right top corner, there is a button 'clone'. Press that, a popup opens. In there, click 'generate git credentials'. Fill in a username/password combo and press 'save git credentials'. That combo will now work with GitKraken.
Who has been working with client GitKraken as GIT, you will know that authentication required? For the application, log in with: [email protected] The repository is with: [email protected] It requires credentials to make a pull, but I tried with both emails and usernames, and does not allow me. Capture: In SourceTree it works perfectly, but here not!. Thanked fully!.
Gitkraken Desktop App - Error login: "Please log in to continue"
48 The git flow is not installed in your machine. Just run this command, macOS: $ brew install git-flow-avh Linux: $ apt-get install git-flow Windows: $ wget -q -O - --no-check-certificate https://raw.github.com/petervanderdoes/gitflow-avh/develop/contrib/gitflow-installer.sh install stable | bash Source git-flow cheatsheet by Daniel Kummer After successful installation run git flow init in your project and then follow the instructions to configure the git flow. Share Follow answered Mar 15, 2019 at 16:36 sybozzsybozz 89788 silver badges77 bronze badges 1 3 Any difference between brew install git-flow-avh and brew install git-flow? – Blues Clues May 20, 2021 at 16:37 Add a comment  | 
I am very new to Git and am starting to learn the command line version. I believe my git flow is not installed correctly. I am running this from a pc. When i run following command: git flow feature start JamesTest I get the following error: git: 'flow' is not a git command. See 'git --help' Did you mean any of these? Looks like the git flow command is not being recognized from all paths? How do I fix this?
Git flow command error: 'flow' is not a git command
You don't need a webhook for that. A regular post-receive hook will work very well. To create and use such a hook you just have to login on the server where your gitlab is installed and create an ssh key for git user. sudo -u git ssh-keygen -f /home/git/.ssh/reponame_key (do not type any passphrase when prompted) Go to your github account and add the public key (it's been created as /home/git/ssh/reponame_key.pub) to your project as a deploy key. have a look at https://help.github.com/articles/managing-deploy-keys if you need help with that. Once that is done, you just have to configure the connection between your git server and github's: add an alias to git user's ssh configuration (add following lines to /home/git/.ssh/config - create it if it's not present) Host reponame IdentityFile /home/git/.ssh/reponame_key HostName github.com User git Now add the new remote (using the alias you just created) to your repository: cd /home/git/repositories/namespace/reponame.git git remote add --mirror github reponame:youruser/reponame.git Now that everything is in place you'll have to create the actual hook: cd /home/git/repositories/namespace/reponame.git/hooks echo "exec git push --quiet github &" >> post-receive chmod 755 post-receive The lastcommand is very important because git will check if a hook is executable before running it. That's it! (Replace reponame, namespace and youruser according to your real accounts and enjoy). Last note: if you want your name andavatar near commits on github, make sure that the email address you are using on gitlab is one of the addresses inked to your github account as well. You'll see your gitlab username otherwise.
I would like to create a webhook within Gitlab to automatically update a mirror repository on Github, whenever a push event happens. I've checked this page, but I didn't understand how it is done. My Gitlab version is 6.5. Here is the configuration page: What should I put in URL? Where do I need to place the script to update the repository?
How to create a Gitlab webhook to update a mirror repo on Github?
You could simply add a second remote: git remote add bitbucket /url/to/am/empty/bitbucket/repo and push everything to bitbucket: git push --mirror bitbucket You can actually pull from or push to multiple remotes from your local repo. Update 2020: As noted below in Rahulmohan Kolakandy's answer, if you are talking about an on-premise BitBucket server (as opposed to bitbucket.org), then you can take advantage of BitBucket Server Smart Mirroring. As commented by V-Q-A NGUYEN: BitBucket Server Smart Mirroring (introduced originally in 2016, and Oct. 2017 for BitBucket Server) is only available for customers with an active Bitbucket Data Center license
I have a repo that I've cloned from GitHub and want to have a mirror of this repo on BitBucket. Is there is any way how to do it? Something like having two origin in the repo as I think.
How to make a GitHub mirror to Bitbucket?
You should check if 'C:\ProgramData/Git/config' actually exists. If it doesn't you can just create it and paste the following into the file: [core] symlinks = false autocrlf = true fscache = true [color] diff = auto status = auto branch = auto interactive = true [help] format = html [rebase] autosquash = true This worked for me.
In Visual Studio 2019, we have been using the GitHub extension successfully since before release. Now, all of the sudden, when we push, pull, or sync, we receive the following in the Output window: Warning: 'C:\ProgramData/Git/config' has a dubious owner: '(unknown)'. For security reasons, it is therefore ignored. To fix this, please transfer ownership to an admininstrator.
Latest Update brings Github error on pull, push, or sync
#1 refers to issue 1 in this repo. username/repoA#1 refers to issue 1 in username's repoA. org/repoA#1 refers to issue 1 in org's repoA. You would use either of the last two options See Autolinked references and URLs: Issues and pull requests.
I have two repositories: Repository A Repository B I also have a project: Project X This Project X has Repository A and Repository B as linked repositories. In Repository A I created several issues: Issue 1 Issue 2 Issue 3 All these issues are appearing on the kanban board of Project X. When I now do a commit on Repository B: closes #1 The commit wont get linked to the Issue 1 of Repository A. Can I configure the project in a way that I can create such references from commits from different Repositories? Or do I use this wrong?
github: how to reference an issue in a commit from a different repository?
58 This is probably a duplicate of GIT - Can't ignore .suo file And to be honest, you can try that suggestion. What you are missing here is to remove the already added *.suo file from the git repository. The other answer has a nice set of commands to run: git rm --cached *.suo git commit -m "Delete suo file from repository" Share Follow edited May 23, 2017 at 12:17 CommunityBot 111 silver badge answered May 4, 2017 at 13:59 Jesper Rønn-JensenJesper Rønn-Jensen 109k4545 gold badges118118 silver badges157157 bronze badges Add a comment  | 
I want to do simple thing, ignore .suo file and bin and obj folders from committing to git repo. I've created .gitignore file and it's working for bin and obj folders, but it keeps allowing .suo file committing. The content of gitignore is simple: /build/ *.suo *.user _ReSharper.*/ *.sdf bin/ obj/ Debug/ Release/ *.opensdf *.tlog *.log TestResult.xml *.VisualState.xml Version.cs Version.h Version.cpp Firstly I've thought that the problem is that .suo file is already on the repo, so I've used set of git commands to remove it from repo: git rm "file.suo" git commit -m "suo removed" git pull origin master git push origin master And everything goes well, .suo is removed locally, it is removed from repo, and on the next commit it gets pushed again to repo. On the picture is committed .suo file. Did anyone had a problem like this? How to solve this kind of problem?
gitignore doesn't ignore .suo Visual studio file
From the documentation to setup a custom domain: Warning: Project pages subpaths like http://username.github.io/projectname will not be redirected to a project's custom domain. This means that due to the relative paths you can either have the assets on your username.github.io/project-name or on your custom domain. If you want them in the github one check what the documentation says about the baseurl configuration, it's at the bottom of the page, in the "Project Url Structure". It's simple you just need to add a baseurl: /project-name row to your _config.yml and use the {{ baseurl }} tag in your permalinks, jekyll will do the substitutions. And to test it locally just run the server with this option jekyll serve --baseurl '' Hope it helps :) Happy coding!
I have created a website and am trying to host it on git hub pages. My site is available at - http://<username>.github.io/<project name>/ But the static files for my site are available at the following path - http://<username>.github.io/css/site.css http://<username>.github.io/script/main.js The above path omits the <project name> So whenever I hit the url my static files are not loaded. Is there a way to make it work with the github url? Note: When I use a custom domain everything works fine because the relative paths are fine in that case. Temporary Solution I have created a User page instead of a Project page to overcome this issue.
Static resources not loading on GitHub Pages
Using Atlassian's Git tutorial (link updated) as a reference. Git checkout: The git checkout command lets you navigate between the branches created by git branch. Checking out a branch updates the files in the working directory to match the version stored in that branch, and it tells Git to record all new commits on that branch. Think of it as a way to select which line of development you’re working on. Source: https://www.atlassian.com/git/tutorials/using-branches#git-checkout Git pull: You can think of git pull as Git's version of svn update. It’s an easy way to synchronize your local repository with upstream changes. The following diagram explains each step of the pulling process. Source: https://www.atlassian.com/git/tutorials/syncing#git-pull Git fetch: The git fetch command imports commits from a remote repository into your local repo. The resulting commits are stored as remote branches instead of the normal local branches that we’ve been working with. This gives you a chance to review changes before integrating them into your copy of the project. Source: https://www.atlassian.com/git/tutorials/syncing#git-fetch
I am using BitBucket for web based hosting of our projects. Along with that I am using their SourceTree for committing and such purpose. I am a bit confused with the Checkout, Fetch and Pull option available in the SourceTree interface and their usage. Can someone familiar with this tool explains the usage of these options available in SourceTree?
Checkout, Fetch and Pull in BitBucket SourceTree
31 Github supports this now with a .gitattributes file. Create a .gitattributes file in the root of the repository. Use the linguist-generated attribute to mark or unmark paths that you would like to be ignored for the repository's language statistics and hidden by default in diffs. For example, to mark search/index.json as a generated file, add this line to .gitattributes: search/index.json linguist-generated=true Reference: https://help.github.com/en/github/administering-a-repository/customizing-how-changed-files-appear-on-github Share Follow answered Nov 18, 2019 at 21:48 prograhammerprograhammer 20.4k1313 gold badges9292 silver badges118118 bronze badges 4 3 Thnx! For a folder recursive - folder/**/* linguist-generated=true. – tkit Feb 11, 2020 at 16:57 How would all filetypes work? It doesn't seem that the classic wildcard works, i.e. *.filetype – Big Money Aug 14, 2020 at 5:55 3 For me all the files in the directory marked as "linguist-generated" pop up with empty content(with the "Load diff" button). Is this the expected behavior or is it expected for the files to not come up in the PR? – livinston Sep 4, 2020 at 4:16 2 I'm seeing the same behaviour as @livinston the files are still shown in the diff, but you have to click the "Load Diff" button to see the content. This isn't helpful for my purposes as the files I want to exclude are large, so they were displayed like this anyway, and I also want them excluded from the count. – kiml42 Mar 22, 2022 at 10:33 Add a comment  | 
We frequently use the Files Changed tab on a pull request to peer review the work we have done on a branch, unfortunately a major part of our development process is regenerating Flex services so when viewing the files changed 99% of the changes are irrelevant. This makes it very easy to miss important changes that should be reviewed. We know the folder that these regenerated services live in, and we could commit all the regen changes in one commit if that would help. Does anyone have any suggestions how we can improve this? Ideally we would exclude a folder from the pull request diff.
Ignoring specific files, file types or folders in a pull request diff
You could use a git filter driver which would, on checkout, take your README.md (needed by GitHub) and generate a proper README (needed by Python, although Lennart Regebro's answer suggests that PyPI does not require any README file) So, keeping aside the fact that PyPI doesn't need a README (and the warning could be simply ignored), here is how you could (in general) generate the expected file with Git: However, any modification to that private file README would need to be reported manually to the README.md file (at least because of markdown syntax which no script can guess for you) That is why Noufal Ibrahim's answer (which I upvoted) might be more adapted, especially if you have access to symlinks (I am still with Windows Xp at work, so no luck for me): Having make README being a symlink to README.rst, or, as Arto Bendiken comments: => having README.rst being a symlink ro README. Git will store the symlink (and not the file the symlink refers to), so you can have both README and its README.rst file in your Git repo.
Python packaging tools expect that our readme file should be named README or README.txt. But if we follow this convention, GitHub displays it as plain text in the project page which is not pretty. (unlike the beautiful HTML version when named as README.rst) Is there any technique to make both PyPI and GitHub happy about README.
README extension for Python projects
Here's the result: https://github.com/danielwertheim/kiwi/wiki/Use-with-Asp.Net-MVC //D
Is there a way to get MarkdownSharp (I'm using the NuGet package) to handle 'GitHub flavored Markdown (GFM)' and especially syntax highlighting of c# code, which (in GFM) is written like this: ```c# //my code..... ``` So, if I pass Markdown formatted content to MarkDownSharp, containg a C# code block (as above) I want it to generate syntax highlighted html for that c# code. Any ideas? I know I can use the supported 4 spaces to indicate a code block, but again, I'm seeking a solution for getting it to support GitHub flavored Markdown.
MarkdownSharp & GitHub syntax for C# code
You can't push straight from Github to Heroku. You're going to have to use the third host to coordinate the push. This could be fired from a Github post-receive hook. To sync straight across use something like: git remote add github [email protected]:user/repo.git git remote add heroku [email protected]:app.git git push heroku refs/remotes/github/master:refs/heads/master
I have a github repo that I want to push to a heroku node. A 3rd host will be co-ordinating this. As I'm going to be doing this on a large scale I want to avoid having to download the contents of the repo onto the 3rd host. How do I do it?
Push from github to heroku without downloading repo
GitHub sets the committer for all commits made using their web interface to the user web-flow. For any given GitHub account, you can add .gpg to its URL to get its public key—so for web-flow, you can find it at https://github.com/web-flow.gpg: -----BEGIN PGP PUBLIC KEY BLOCK----- xsBNBFmUaEEBCACzXTDt6ZnyaVtueZASBzgnAmK13q9Urgch+sKYeIhdymjuMQta x15OklctmrZtqre5kwPUosG3/B2/ikuPYElcHgGPL4uL5Em6S5C/oozfkYzhwRrT SQzvYjsE4I34To4UdE9KA97wrQjGoz2Bx72WDLyWwctD3DKQtYeHXswXXtXwKfjQ 7Fy4+Bf5IPh76dA8NJ6UtjjLIDlKqdxLW4atHe6xWFaJ+XdLUtsAroZcXBeWDCPa buXCDscJcLJRKZVc62gOZXXtPfoHqvUPp3nuLA4YjH9bphbrMWMf810Wxz9JTd3v yWgGqNY0zbBqeZoGv+TuExlRHT8ASGFS9SVDABEBAAHNNUdpdEh1YiAod2ViLWZs b3cgY29tbWl0IHNpZ25pbmcpIDxub3JlcGx5QGdpdGh1Yi5jb20+wsBiBBMBCAAW BQJZlGhBCRBK7hj4Ov3rIwIbAwIZAQAAmQEIACATWFmi2oxlBh3wAsySNCNV4IPf DDMeh6j80WT7cgoX7V7xqJOxrfrqPEthQ3hgHIm7b5MPQlUr2q+UPL22t/I+ESF6 9b0QWLFSMJbMSk+BXkvSjH9q8jAO0986/pShPV5DU2sMxnx4LfLfHNhTzjXKokws +8ptJ8uhMNIDXfXuzkZHIxoXk3rNcjDN5c5X+sK8UBRH092BIJWCOfaQt7v7wig5 4Ra28pM9GbHKXVNxmdLpCFyzvyMuCmINYYADsC848QQFFwnd4EQnupo6QvhEVx1O j7wDwvuH5dCrLuLwtwXaQh0onG4583p0LGms2Mf5F+Ick6o/4peOlBoZz48= =HXDP -----END PGP PUBLIC KEY BLOCK----- You can then import and trust that public key. As shown in this thread: $ curl https://github.com/web-flow.gpg | gpg --import $ gpg --edit-key [email protected] gpg> trust gpg> save $ gpg --lsign-key [email protected]
If you make an edit through GitHub's website, or merge a pull request, then the resulting commits are automatically signed with GitHub's GPG key. It looks like this: I would like to have the full public key so that I can add it as a trusted key on my system. What is GitHub's public GPG key?
What is GitHub's public GPG key?
UPDATE: the behavior described below wasn't intended. pushed_at will be updated any time a commit is pushed to any of the repository's branches. updated_at will be updated any time the repository object is updated, e.g. when the description or the primary language of the repository is updated. It's not necessary that a push will update the updated_at attribute -- that will only happen if a push triggers an update to the repository object. For example, if the primary language of the repository was Python, and then you pushed lots of JavaScript code -- that might change the primary language to JavaScript, which updates the repository object's language attribute and in turn updates the updated_at attribute. Previously, the primary language was getting updated after every push, even if it didn't change (which wasn't intended), so it triggered an update to updated_at. The difference is that pushed_at represents the date and time of the last commit, whereas the updated_at represents the date and time of the last change the the repository. A change to the repository might be a commit, but it may also be other things, such as changing the description of the repo, creating wiki pages, etc. In other words, commits are a subset of updates, and the pushed_at timestamp will therefore either be the same as the updated_at timestamp, or it will be an earlier timestamp.
Looking to V3 API Repos (GET /repos/:owner/:repo) we have 3 datetime : "pushed_at": "2011-01-26T19:06:43Z", "created_at": "2011-01-26T19:01:12Z", "updated_at": "2011-01-26T19:14:43Z", to have a fast example just link this https://api.github.com/repos/twitter/bootstrap What is the difference between pushed_at and updated_at ?
GitHub API V3 : what is the difference between pushed_at and updated_at?
Ok I got the answer from IRC after a long chat. I'll have to work with forks and pull requests, or add pre-push hooks on each dev's machine since GitHub doesn't allow per branch permissions neither pre-publish canceling hooks. Here is a part of the answers I got: Fork the repository. then the developer can work on their own version of the repository, and doesn't have to worry about committing to the wrong branch. And then someone upstream can always merge into whatever branch should be committed into. Yeah but we're a company and we don't want that all our devs have forks Why not? Well they should be able to push their branch on a common repo to work with some other devs on the same feature for example. Have a read through https://help.github.com/articles/using-pull-requests. You can still send patches around between multiple forks. This is the model that git was built on I know but I want to be able to see quickly in a central way the actual work on any feature/hotfix, ... To cut a long story short: GitHub doesn't support per-branch permissions
I have some Git private repositories on a GitHub company account, and I don't want anybody to push on some specific branches (like master, develop and beta or by pattern). I also tried to define some hooks but I want this to be done on GitHub and not done with a pre-push hook on the clients. So to explain my problem simply, I want: git push origin develop to be refused by the server (which is GitHub) because of the branch name, but I do not want a client check by pre-push hook, I really want GitHub to do the check and refuse it. Also if it's possible to allow only certain users to do so, but disabling it for everybody would be enough at first.
Disable push to specific branches on GitHub