Response
stringlengths 8
2k
| Instruction
stringlengths 18
2k
| Prompt
stringlengths 14
160
|
---|---|---|
Even if the folder doesn't exist, check the index status:
cd libs/OAuth
git ls-files -- functions
If there is an entry registered in the index, you will need to remove it before being able to add your subrepos as a submodule.
(as explained in "Issue with adding common code as git submodule: “already exists in the index”")
All this assumes that you are at the root folder of a currently cloned repo, which will act as the parent repo of any submodule you would declare.
|
It is seying that I cannot do this:
git submodule add -f [email protected]:thephpleague/oauth2-server.git libs/OAuth/functions
Because of this:
'libs/OAuth/functions' already exists and is not a valid git repo
I just don't get it. It does not exists anywhere. Is there another git config file hidden on my computer that I don't know of or something? I tried deleting .git and pulling everything again that did not do anything. Any ideas?
I also tried this:
git ls-files --stage functions
When I was inside of libs/OAuth and I got nothing.
Then I tried this:
sudo git rm --cached functions
I got this error:
fatal: pathspec 'functions' did not match any files
I also tried this:
sudo git rm -r --cached functions
And got the same previous error.
|
Error with git: " already exists and is not a valid git repo"
|
Here's a simple solution that may or may not work for you.
Create two projects on GitHub. One project should be just the Rails app (i.e. everything inside the Rails app directory). The other project should be everything outside the Rails app directory.
Add the Rails app project as a git-submodule within the "container" project.
Now you can add Heroku as a remote on the Rails app repository separately and push it to heroku. Heroku will accept the push because it is just a Rails app with the expected directories and files.
|
I'm creating a webservice and I want to store the source on github and run the app on heroku. I haven't seen my exact scenario addressed anywhere on the 'net so far, so I'll ask it here:
I want to have the following directory structure:
/project
.git
README <-- project readme file
TODO.otl <-- project outline
... <-- other project-related stuff
/my_rails_app
app
config
...
README <-- rails' readme file
In the above, project corresponds to http://github.com/myuser/project, and my_rails_app is the code that should be pushed to heroku. Do I need a separate branch for the rails app, or is there a simpler way that I'm missing?
I guess my project-related non-rails files could live in my_rails_app, but the rails README already lives there and it seems inconsistent to overwrite that. However, if I leave it, my github page for the rails app will contain the rails readme, which makes no sense.
Also ... I tried just setting it up as described above and running
git push heroku
from the main project folder. Of course, heroku doesn't know I want to deploy the subfolder:
-----> Heroku receiving push
! Heroku push rejected, no Rails or Rack app detected.
|
Heroku and Github integration (how to structure the project)
|
15
If you find your code online somewhere which you did not permit or without your license, you can submit a DMCA claim. Here is Google Play's takedown form and GitHub's DMCA guide.
Share
Improve this answer
Follow
edited May 7, 2017 at 4:24
Nathan Tuggy
2,2362727 gold badges3131 silver badges3838 bronze badges
answered Feb 2, 2016 at 17:21
RN_RN_
88822 gold badges1111 silver badges3030 bronze badges
1
Does this only apply to Apps and Google Play or does it also apply to a website?
– Web Developer
Mar 14, 2021 at 14:25
Add a comment
|
|
If my entire project is stored in a public github repo what's to stop people from downloading it and publishing it on Google play before I do?
I want to use github to keep track of changes in a group Android project, I was told an active account would also benefit future employment, and make it public to help other students. But what if I wanted to eventually publish it to Google play? See the above question.
I'm new to software development.
|
Can someone steal my code from github and publish my app?
|
No. Templates are only supported for issues and pull requests.
Edit: Edwin's answer is neat, but I don't think it does what OP was asking for. I'll leave this answer in place for now.
|
Is there a way to add a .github/release_template.md similar to pull requests, so that when you are drafting a new release, it uses the template?
I've seen https://github.com/apps/release-drafter and alike that you can add to your GitHub, but was wondering if this is natively supported.
|
Release Template for GitHub
|
Update
Now, the main search bar is used for all searches. You can filter by code/repos/issues/etc on the left. To see pull requests, click the Issues filter.
|
I'm currently viewing a popular GitHub repo. Inside there are over 300 pull requests (100 open, 200 closed).
How can I search these pull requests to see if a particular topic already exists within them?
i.e. I don't want to create some code and submit a pull request if someone has already done a similar pull.
Edit: Alternatively - since I know what file(s) I plan on changing - is it possible to view a specific file on GitHub, and say "Hey. Are there any outstanding pull requests that relate to this specific file?".
Update: GitHub now offers this easily - when browsing a repository the search bar at the top offers to search only the select repo - which makes it much easier to search for what you need.
|
How can I search GitHub pull requests?
|
I get 41 result with this query.
The key is to specify the user/reponame, not the the reponame:
repo:hadley/ggplot2
Combined with wildcard for the path argument, I select only one argument with this query:
repo:hadley/ggplot2 facet_wrap path:inst/*.r
So, for path, the key is to add a wildcard (which doesn't seem to be documented anywhere).
path:inst/ alone won't work. path:* or path:*.r will.
From the comments:
I need to find "beforeSend" entry which is in this file - "jquery / test / unit / ajax.js" at github.com/jquery/jquery/blob/master/test/unit/ajax.js but when I fire repo:jeresig/jquery beforeSend path:jquery/test/unit*.js in the advance search I don't get any results.
I am also confused which user should I use as jquery has many contributors like John Resig, timmywil
In this case (2012):
the repo is jquery/jquery (no need for a username here)
the repo:hadley/ggplot2 facet_wrap path:inst/*.r
0 directive to use must not repeat the repo name: so, repo:hadley/ggplot2 facet_wrap path:inst/*.r
1, not repo:hadley/ggplot2 facet_wrap path:inst/*.r
2
repo:jquery/jquery beforeSend path:test/unit*.js
will work, and provide 4 results within JQuery Code.
Update 2022:
The query would be:
repo:jquery/jquery beforeSend path:test extension:*js type=Code&ref=advsearch
|
I am just looking for an example ( the correct command to fire in the advance search at github ) about searching a word inside a folder of a particular repository. I guess this will involve the "path:" option but not sure how to use it
As an example I need to search for a function name "clean" or a test case for "clean" or similar function inside the jquery test suite at the following location -
https://github.com/jquery/jquery/tree/master/test
I understand there are some filters like repo: and path: provided by github but not sure how to use them.
Also I am not satisfied with an answer posted for a similar question at -
Search a github repository for the file defining a given function
I understand I can fork it to my local machine and do a search there but I don't want to download the whole repository simply to search it. I just need to search it online at the github site itself.
Thanks in advance !!
|
how to search a particular word or entry inside a sub folder in a repository on github
|
Anything else? Nope. Configuring Git with the same email address on both machines should do the trick since commits are associated to the committer's email address. You might have a little more work cut out for you if you're using GPG for signing tags, but that isn't in your question.
The other answer's mention of setting up an SSH key on Github isn't required for maintaining identity across machines — but not needing to type in your password will certainly make life easier. You can also use the Git credential helper to cache your Github password.
If you're working on Git projects across multiple machines, you might also want to add Dropbox into your workflow for even more power.
|
I'm new to Git and I searched for an answer to this but couldn't quite find what I need.
Basically, I have setup a project on my work computer, added files etc and commited to a GitHub repository. I get all that but once I got home, I wanted to download that same project and change a few files as the same user.
At home, I've set up my user.name and user.email like so:
git config --global user.name "username"
git config --global user.email "email"
What I think I do next is:
git clone url
As I said, I'm the same user just working from a different computer - is there anything special I need to do to make sure Git recognises that I'm the same user?
I'm aware this is probably a silly question but nowhere I've found seems to cover this and I really want to make 100% sure that I'm doing this correctly.
|
Git - Same User, Different Machine - Clone?
|
Put it in the repo if:
1- you want to keep track of the changes
2- it is actually a part of the project and you want people to receive it when they clone the repo
Don't put it in the repo (use .gitignore to exclude it) if:
1- it changes often but the changes are not meaningful and you don't want to keep the history
2- it is available online or you can make it available online and put a link or something in the repo for people to know where to find it
Dropbox is good if you don't have lots of people downloading it, Amazon S3 is your best bet for hosting it.
|
I have one (for now) large text data file of 120 MB.
Is it a poor practice to put it in the repo? Does it affect search functionality on GitHub?
It seems like it is a bad idea because the entire source code is only 900 lines.
Not planning on updating the file.
Could put it on Dropbox or Google Docs, but then it is separate from the repo.
If not GitHub, is there a better way of managing/backing up large data files?
|
How to manage large data files with GitHub?
|
ERROR: type should be string, got "\nhttps://github.com/trustmaster/trac2github looks like it might work well, covering milestones, tickets, comments, converting usernames and setting assignees.\n" |
We use Trac for an open-source project I'm working on. I'd like to export all of our open tickets to Github's Issues. I've found a couple small scripts that might do it, but I was wondering if anyone has done this and has suggestions.
Ideally, it would convert trac's description syntax to markdown and also export metadata like milestone information, but even a simple, working export is probably okay.
|
How to export Trac to Github Issues
|
rendering a font would be faster and nicer.
Yes, except you wound not use any (multiple) colors in said "icon as a font".
See "GitHub redesigns its icons using a custom font"
You can, of course, take a monotone font-rendered icon and set its colour to, for example, red or blue, but that changes the entire icon; you can’t have different parts of the icon use different colours, or use shading
(example of CSS effects for Icon Font here, from the Trello article)
But, as far as I can see (Markdown Cheatsheet, and Markdown Help), no, you cannot have a custom font.
|
Is it possible to use custom fonts with github's markdown? I'm currently loading an image as a logo, yet rendering a font would be faster and nicer.
|
Custom fonts in Github's markdown (like README.md)?
|
Whatever the private info was, invalidate it if possible.
Contact GitHub. They normally respond quite quickly (I've frequently received responses in just a few hours), as they're obviously the ones that have the ability to remove it.
|
I accidentally uploaded an image I don't want to have on GitHub. I had thought that I had cut private information from an image I was uploading for example purposes, but the private information remains. It contains things like a hostname that I would prefer is not public knowledge.
Is there a way to remove that image from github's image registry?
I know it's highly unlikely that someone ever unearths it by checking all the possible destinations for the image on their server, but it would give me peace of mind.
|
Can images on 'user-images.githubusercontent.com' be deleted?
|
If you have already established remote-tracking branches (i.e. git clone does this automatically) and want to use git pull with the intention of grabbing and merging the latest commits for the current branch off the remote repository, I believe that executing the following will suffice:
git pull
To achieve the same effect with the inclusion of a refspec (unnecessarily long-winded):
// Pulls the remote 'master' branch down to the local 'master' branch
git pull origin master:refs/remotes/origin/master
You are receiving that error because the provision of a URL is not how the refspec is formatted.
For further details on how the refspec works and its syntax, consult this chapter from the wonderful Pro Git book. Hope that helps!
|
Here is the problem:
Whenever I do
$ git pull 'https://github.com/username/reponame.github.io.git'
followed by the url I get no problems but when I do
git pull origin master 'https://github.com/username/reponame.github.io.git'
followed by the url it returns
fatal: Invalid refspec 'https://github.com/username/reponame.github.io.git'
What does this mean and how should I go about fixing it?
|
git pull origin master returns fatal: invalid refspec
|
Try setting the HOME environment variable in Windows to your home folder (c:\users\username).
( you can confirm that this is the problem by doing echo $HOME in git bash and echo %HOME% in cmd - latter might not be available )
|
We were using a build script to automate our publishing process and it was working with SVN but now we are using Git and need to do some command line operations to pull from our remote repository.
I was able to follow the guide here and using the Git bash it works great. However, I need to perform these tasks from the Windows command line so that they can be executed by the script.
git pull origin master works in the Git bash.
cd "c:\program files (x86)\git\bin
git --git-dir=path\to\.git pull origin master
fails with an error
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
Obviously my SSH key is not being used properly or something. I'm so new to this that I really have no clue what to do.
|
How to use 'git pull' from the command line?
|
Github just released a feature for doing this by clicking in the gutter of a diff view: https://github.com/blog/1705-expanding-context-in-diffs
|
In github commit viewer or pull request viewer, or the compare view, can I have it show more lines of context around the diffs?
Using git cli, I'd do git diff -U100 (or however many lines of context I wanted).
I checked out help.github.com with no luck (lines of context doesn't even show up). Other diff viewers usually do this, and other code review tools usually do this. And Github has all kinds of hidden features, so I figured there might be a hidden feature here. Is this possible?
|
How to get more lines of context in Github
|
You could try some kind of git-bzr bridge like this git-bzr git-bzr script:
This script allows you to add bazaar repositories as git branches in your git repository.
After that, you can fetch the Bazaar repo, make some changes, and push it back into Bazaar.
The reverse is possible, meaning you can clone a bzr repo and push to your GitHub repo with bzr-git.
|
I want to contribute actively to a project that is hosted on Launchpad.
I'm much more comfortable with GitHub, and would like to continue to use it if possible.
Would I be able to mirror the bzr repository on github?
If it's possible, how could I set this up?
|
How can I mirror a project hosted on launchpad on github?
|
Okay, Github had a response.
These images can be removed by staff in the event of a Terms of Service violation, however they do not have a set expiration and are not deletable by customers.
Ref: https://github.community/t/does-user-images-githubusercontent-expires/129292
As for the aforementioned Terms of Service, I think it may be found here:
GitHub Terms of Service
|
I'm servicing a blog using GitHub Pages.
The blog service has many images files to upload, so I needed a repository that stores images.
While searching for a repository, I found a method using github-issues.
I capture my image first and then paste to github-issues body. It will be changed to a markdown image tag that has an image url like:

My question is: does the image stored in githubusercontent.com have an expire time?
If the image has an expire time, it will not appear on my blog later.
|
Do images in 'user-images.githubusercontent.com' have expire time?
|
There is no simple solution to this. The official docs say nothing about that which means it's not supported.
The GitHub.com authentication works based on cookies while the API authentication uses tokens/passwords. That means if you really want to hack the things to upload your image using GitHub, you have to login using a cookie which is probably more difficult than using a third-party image hosting website.
For example, you could just upload your image to imgur and then add it in the issue body:

This will anyway be proxied by GitHub proxy and will be served offer HTTPs.
|
I am creating issues with https://developer.github.com/v3/issues/#create-an-issue. Is it possible to attach images to message body?
I tried 'Accept', 'application/vnd.github.v3.html+json'and emmbeded the image as img elment base64 encoded. The image will not show, but the ticket editor shows the img element.
|
Create an issue with image via GitHub API
|
If you were willing to still use git (just not create a repository) you could do it with git archive as explained in this question.
|
I want a command line tool to download a Github repo without creating a local git repo.
One idea is a download tool to download Github zips from a url like
https://github.com/lukeholder/fuel-website/zipball/master
I'm on Windows 7 and don't want to have to install curl or wget and use only a only native tool.
It would be preferable to not download a zip, but just somehow clone the repo and not have the local git repo ever created.
Do you have any ideas without using git? In effect it would be a git clone and del .git directory
|
git download, not clone fetch etc
|
9
This seems to happen if any files were renamed, I had a pull request that included renamed files showing the same message and as soon as I named the files back and committed that the "Resolve conflicts" became available again
Share
Improve this answer
Follow
answered Nov 5, 2018 at 13:30
valexavalexa
4,4753232 silver badges4848 bronze badges
1
2
So, what to do then? Just cancel the pull request, merge locally, and push? Or can the PR later be linked to the pushed merge commit? (Sorry if I'm totally confused, never seen a PR from the inside...) UPDATE (1 min. later...): Oh, I see, PRs are no magic, they are just like issues... Nothing to do with Git itself, actually. Correct?
– Sz.
Feb 27, 2023 at 22:11
Add a comment
|
|
GitHub added a feature about a month ago to resolve merge conflicts on the web interface, however it only works for "simple" merge conflicts:
No conflicts
Simple conflicts
Complex conflicts
In the blog post that introduced the new feature, GitHub mentions competing line changes, which can range from fairly simple to quite complex.
What qualifies as a conflict too complex to resolve in the web editor?
|
GitHub Pull Request complex conflicts
|
6
You can enforce pull request reviews from CODEOWNERS based on branches.
In your Repo, Go to:
Settings -> Branches -> Add Rule -> Apply rule to <your branch> .
Then mark Require pull request reviews before merging -> Require review from Code Owners
This will make sure the rule only applies to that specific branch
Share
Improve this answer
Follow
answered Sep 29, 2018 at 10:20
orepororepor
92922 gold badges1313 silver badges2323 bronze badges
4
10
I should've been more clear. The option you mentioned only to specify if CODEOWNERS approval is mandatory or not. The reviewers still get added to PRs for private branches and Github sends unnecessary notification emails.
– ronakg
Apr 30, 2020 at 22:40
4
Hey! Did you find any solution for this?
– Teju Amirthi
Mar 14, 2022 at 16:58
Nope. Still no solution to this problem.
– ronakg
Feb 15, 2023 at 20:55
This doesn't answer the question. I would love to know the answer to this.
– nick
Sep 11, 2023 at 11:12
Add a comment
|
|
I'm using CODEOWNERS file on Github to setup automatic pull-request reviewers based on files/folders. The system works well and reviewers get added automatically to pull-requests.
However, I want to limit this setup just for release branches, and not for private branches. When a private branch is taken off of a release branch, it also gets the CODEOWNERS file and in turn all the "automatic reviewers for pull-requests" setup.
Is there a way to make sure that the CODEOWNERS file applies only to specific branches? Or a way to make sure that this particular file doesn't get synced to other branches at all?
|
How to limit Github codeowners file to specific branches only?
|
GitHub keeps track of forks made through their interface and assumes pull requests will be for that original repository. You need to tell GitHub that your copy is not a fork but rather a regular repository that just happens to have identical history. Sadly, GitHub doesn't offer a good way to just uncheck the fork link. I typically solve it this way:
Clone the repository, git pull, and ensure your local copy is completely up to date.
Delete the repository on GitHub.
Create the repository on GitHub using the exact same name. Ensure it's an empty repository (don't create a README or LICENSE file.)
git push all the content back into the repository. (You may need to switch to each branch and push it, and you also may need to git push --tags.)
FRAGILE: This approach will lose existing GitHub issues and pull request comments. If you're using these heavily, this approach is probably a bad idea, and you should contact GitHub customer support to help you instead.
|
I have a set of documentation for my company's API, based on the excellent Slate framework from TripIt. Per instructions, I forked their repo and proceeded to customize it. That fork lives here.
The obnoxious thing is that when contributors in my organization do a new pull request, the "base fork" on the Github "Comparing Changes" screen defaults to TripIt's repository, not my fork. They've more than once sent pull requests to the wrong place. Telling people "don't do that" isn't a particularly reliable solution. How can I set the default for where PRs are based to my fork?
|
How do you change the default base fork for a github pull request? [duplicate]
|
Since the OP is using SourceTree, do the following:
Generate your Personal access tokens in Github account setting.
Double click a repository in SourceTree, click Setting icon in the top right of the popup window.
Click Remotes in the menu tab. You will see the remote URL of this repository, which should be like this https://github.com/username/repo.git.
Click Edit and change it to https://<your_token>@github.com/username/repo.git.
DONE.
|
I am using the version control as GitHub through SourceTree, but it is getting failed from 13th August, the below is the error I am getting from GitHub.
remote: Support for password authentication was removed on August 13,
2021. Please use a personal access token instead. remote: Please see https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/
for more information.
Anybody know what was the problem, or how can I use the personal access token?
|
When I try to pull or push in GitHub, I am getting an error message: "Please use a personal access token instead."
|
There is some issue (if using https) if username contains "some" special characters.
|
My repo: https://[email protected]/shadyabhi/learnajax.git
shadyabhi@archlinux-N210 ~/github/learnajax $ cat .git/config
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[remote "origin"]
url = https://[email protected]/shadyabhi/learnajax.git
fetch = +refs/heads/*:refs/remotes/origin/*
shadyabhi@archlinux-N210 ~/github/learnajax $ git config -l
user.name=shadyabhi
[email protected]
merge.tool=vimdiff
github.token=1095de7027bVVVV01cfAAAAAa5fc8f6
color.ui=auto
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
remote.origin.url=https://[email protected]/shadyabhi/learnajax.git
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
shadyabhi@archlinux-N210 ~/github/learnajax $ git push -u origin master
Password:
fatal: Authentication failed
shadyabhi@archlinux-N210 ~/github/learnajax $
Now, I cant push into my repo. I have checked the github.token its the same as my Account Settings. Ofcoarse, I am entering the right password but I get this error.
|
Cannot push to github repo
|
Does this work? I had to change this bit of code recently from ssl.verifypeer to ssl_verifypeer
library(httr)
set_config(config(ssl_verifypeer = 0L))
see here devtools::install_github() - Ignore SSL cert verification failure
|
I am trying to install a package from github in R, however I am getting the following error:
> install_github("jmp75/rClr", build_vignettes=TRUE)
Downloading github repo jmp75/rClr@master
Error in curl::curl_fetch_memory(url, handle = handle) :
Peer certificate cannot be authenticated with given CA certificates
I have set the RCurl options as such:
options(RCurlOptions = c(getOption("RCurlOptions"), ssl.verifypeer = FALSE, ssl.verifyhost = FALSE ) )
After checking the setting:
getOption("RCurlOptions")
we see....
$cainfo
[1] "C:/_CODE/R/Library/RCurl/etc/ca-bundle.crt"
$ssl.verifypeer
[1] FALSE
$ssl.verifyhost
[1] FALSE
Still I get the error:
Downloading github repo jmp75/rClr@master
Error in curl::curl_fetch_memory(url, handle = handle) :
Peer certificate cannot be authenticated with given CA certificates
any clues
|
R - install_github fails
|
Allow anonymous access to badges might be disabled for your project settings.
You can go to Project Settings, click Settings under Pipelines. And make sure toggle Disable anonymous access to badges is off. Please refer to below pic.
|
I've set up azure pipelines for one of my github repositories. Everything is working perfect except the build status badge. It is not getting displayed correctly, it seems like the image could not be loaded.
This is currently getting displayed:
Edit
Code used in the markdown file is automatically generated by azure devops
[](https://dev.azure.com/larsbehl/larsbehl/_build/latest?definitionId=1&branchName=master)
|
Azure Pipelines status badge not getting displayed in markdown
|
Simply follow these steps and you will set up your SSH key in no time:
Generate a new ssh key (or skip this step if you already have a key)
ssh-keygen -t rsa -C "your@email"
Once you have your key set in home/.ssh directory (or Users/<your user>.ssh under windows), open it and copy the content
How can I add the SSH key to the GitHub account?
Login to the GitHub account
Click on the rancher on the top right (Settings)
Click on the SSH keys
Click on the Add SSH key
Paste your key and save
And you are all set to go :-)
|
I have got an issue that seems about the format of SSH key used by GitHub. I used Git Bash to generate a new SSH key:
$ ssh-keygen -t rsa -C "[email protected]"
Then, I copied the key to the SSH section in settings of my GitHub account page. However, it came with the issue notice as follows:
Key is invalid. It must begin with 'ssh-ed25519', 'ssh-rsa', 'ssh-dss', 'ecdsa-sha2-nistp256', 'ecdsa-sha2-nistp384', or 'ecdsa-sha2-nistp521'. Check that you're copying the public half of the key
Following that, I edited my SSH key starting with ssh-rsa and my email address at the end. However, the issue is still there.
What is the solution to this?
|
Issue on adding SSH key to GitHub
|
It worked , I set the same config in remote side as well. it worked now..
git config --global pack.windowMemory "100m"
git config --global pack.SizeLimit "100m"
git config --global pack.threads "1"
git config --global pack.window "0"
|
git clone is aborting due to possible repository corruption on the remote side
even though memory settings are done properly
I would able to fetch and push my codes to same repo. when I try to clone in another machine it says error.
Here is .gitconfig settings
[pack]
windowMemory = 1000m
SizeLimit = 1000m
threads = 1
window = 0
Error:
Cloning into 'auto_shop'...
stdin: is not a tty
remote: Counting objects: 3043, done.
remote: Compressing objects: 100% (2872/2872), done.
error: pack-objects died of signal 94.62 MiB | 89.00 KiB/s
error: git upload-pack: git-pack-objects died with error.
fatal: git upload-pack: aborting due to possible repository corruption on the remote side.
fratal: early EOF: 31% (966/3043), 5.68 MiB | 223.00 KiB/s
emote: aborting due to possible repository corruption on the remote side.
fatal: index-pack failed
Also, git fsck does not give any errors.
# git fsck
Checking object directories: 100% (256/256), done.
Checking objects: 100% (2218/2218), done.
dangling commit 7ae478bea3aa6c42cc8fe865c9fc26b35ea9e15d
dangling commit a657b57b65f63f4ffea1c25c77ff62c94471d41a
dangling commit 3c9ef0ff7818812f506fa1d18ef4af4a90a4938d
Please help me how to fix this issue ?
|
git clone is aborting due to possible repository corruption on the remote side even though memory settings are done properly
|
To compare the files of a branch called branch located on GitHub against master on the same repository, you can use git diff:
git diff origin/branch origin/master
The following will work to compare the commits between the two branches:
git log --left-right --graph --cherry-pick --oneline origin/branch...origin/master
As mentioned in my comment above, it is possible that two branches can have identical files but different commits.
|
The GitHub web interface has a nice feature telling me whether a branch is even with the master branch.
Is there a command-line equivalent of this feature? I work with multiple repositories and I'm looking for a quick way to see whether branches are even or require attention.
Here are screenshot of the GitHub web interface, for those wondering about this feature:
|
How can I check whether two branches are "even"?
|
You can use commit --date argument:
git commit -m "message" --date "Tue Apr 28 23:00:00 2015 +0300"
UPD:
there is also pretty cool script for shifting old commits date (you need Perl to run it):
https://raw.githubusercontent.com/gitbits/git-shift/master/git-shift
perl git-shift +5h 2e6fd0a9dc98403c4fca638e411b3451cbc66a89
UPD2:
You can create custom alias in order to shift all new commits automatically. In order to do that, put the following line into your ~/.bashrc file
alias future-commit='git commit --date "$(date -v +4H)"'
or
alias future-commit='git commit --date "$(date -d +4hours)"'
reload terminal and now you will be able to commit with +4 hours shift:
future-commit -m "future commit"
|
Is there any easy way to postpone GitHub commits?
It would be also nice if these commits will go one after another in 1 hour.
Let's say if I have 5 commits, the first one should appear at 10am, second at 11am, third at 12pm and so on.
|
Use future date while making git commits
|
Depending if you deal with a User/Organization (UO) site or a Project site (P), do :
from your working folder git init
git remote add origin [email protected]:userName/userName.github.io.git (UO) or git remote add origin [email protected]:userName/repositoryName.git (P)
jekyll new . creates your code base
in _config.yml, set the baseurl parameter to baseurl: '' (UO) or baseurl: '/repositoryName' (P)
in .gitignore add _site, it will be versioned in the other branch
jekyll build will create the destination folder and build site.
git checkout -b sources (UO) or git checkout master (P)
git add -A
git remote add origin [email protected]:userName/userName.github.io.git0 commit your source code
git remote add origin [email protected]:userName/userName.github.io.git1 (UO) or git remote add origin [email protected]:userName/userName.github.io.git2 (P) push your sources in the appropriate branch
git remote add origin [email protected]:userName/userName.github.io.git3
git remote add origin [email protected]:userName/userName.github.io.git4, this file tells gh-pages that there is no need to build
git remote add origin [email protected]:userName/userName.github.io.git5 init the repository
git remote add origin [email protected]:userName/userName.github.io.git6 (UO) or git remote add origin [email protected]:userName/userName.github.io.git7 (P)
git remote add origin [email protected]:userName/userName.github.io.git8 (UO) or git remote add origin [email protected]:userName/userName.github.io.git9 (P) put this repository on the appropriate branch
git remote add origin [email protected]:userName/repositoryName.git0
git remote add origin [email protected]:userName/repositoryName.git1 commit your site code
git remote add origin [email protected]:userName/repositoryName.git2 (UO) or git remote add origin [email protected]:userName/repositoryName.git3 (P)
You now have something like Octopress does. Look at their rake file, there are some nice comments inside.
|
I just created a great gallery for my Jekyll blog which builds perfectly on my localhost:4000. However, GitHub pages doesn't support the Jekyll Gallery Generator plug-in I am using: https://github.com/ggreer/jekyll-gallery-generator
I read about the alternative method of hosting Jekyll on a traditional host using FTP (uploading the _site directory) http://jekyllrb.com/docs/deployment-methods/ However, rather than reconfigure my entire site and hosting, It would be great if GitHub Pages could be used somehow even though I'm using a non-supported plugin.
What is a workaround for this?
|
How do I configure GitHub to use non-supported Jekyll site plugins?
|
And it seems that just after I asked this, I made a trivial change. This was picked up and pushed. So it seems that you have to wait until you've made a new commit in order for hg-git to pick it up.
|
I'm trying to get the hg-git extension working under Windows and after hours of fiddling, I finally seem to have it working. However, nothing shows up in my git repository even though the output of hg push reads:
importing Hg objects into Git
creating and sending data
github::refs/heads/master => GIT:8d946209
[command completed successfully Wed Oct 20 15:26:47 2010]
|
No changes are pushed when using hg-git
|
Problem is related to cmd/go not being aware of git identities and assuming there is only one articulated in the .gitconfig file.
Work-around: have a set of git identities ready to replace global .gitconfig when you need to work with that git identity and are dealing with cmd/go tools that update the module file.
|
I developed a repo on computer A and created a go.mod/go.sum that I checked in.
I pull that repo with the go.mod/go.sum files on computer B, but when I try to build the program, the module constraints can't be satisfied.
$ go build
go: finding github.ibm.com/kms/key-protect-client v0.1.5
go: finding golang.org/x/tools v0.0.0-20180221164845-07fd8470d635
go: github.ibm.com/kms/[email protected]: unknown revision v0.1.5
go: error loading module requirements
The repo that is failing is a private repo, and for some reason it doesn't get downloaded to the module cache. On another computer, the dependencies are downloaded and the build succeeds. I am building another private repo in that same domain, so I know that my github credentials give me access to these repos. But for some reason, the go module system can't get to the dependent repo.
I cannot find more information how to debug this.
|
go build can't find a revision
|
48
You can close an issue through the GitHub web interface when you're viewing the issue. The "Close Issue" button is to the left of the "comment" button under the comment box. I believe you need to be a collaborator on a repo to close an issue.
Share
Improve this answer
Follow
answered Dec 1, 2015 at 0:44
Lucas BonnerLucas Bonner
83977 silver badges77 bronze badges
4
7
You can also close issues you opened.
– Alexander O'Mara
Dec 1, 2015 at 2:47
Looks like the permissions were off. It works now, thanks!
– Person
Dec 1, 2015 at 6:19
Splendid, glad you figured it out!
– Lucas Bonner
Dec 2, 2015 at 18:02
Can only close if you're a collaborator.
– samcozmid
Feb 7, 2018 at 5:00
Add a comment
|
|
I thought there would be a simple way to do this, but I'm really having a hard time finding any answers in any search I make. I have some issues that I need to close because we decided that it is not really an issue, so I need to close it. I already know how to close an issue with commit message, but I can't find any other way to do this.
|
How do I close a GitHub issue without making a commit?
|
It seems likely that you have more than one SSH key, and the key that's being presented is a deploy key for the repository rather than one of your account's keys with write permissions. There are two ways of dealing with this:
Remove all keys from your SSH agent, and re-add just the correct account key.
ssh-add -D
ssh-add /path/to/correct/key
Use HTTPS instead of SSH. You can do this easily by changing the remote URL for origin to use the HTTPS scheme instead of SSH.
One or the other of these should work, unless you are simply presenting the wrong credentials altogether.
|
I am the owner for the "project" repo, but somehow I am not able to push to it.
user@none ~/rails_projects/project $ git remote -v
origin [email protected]:user/project.git (fetch)
origin [email protected]:user/project.git (push)
Here is authentication check:
user@none ~/rails_projects/project $ ssh -T [email protected]
Hi user/project! You've successfully authenticated, but GitHub does not provide shell access.
Push attempt:
user@none ~/rails_projects/project $ git push origin qa
ERROR: The key you are authenticating with has been marked as read only.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Any idea how to fix this error?
|
Github authenticates but will not allow code push
|
You can download Apple's official collection of developer command line utilities (which includes git) by either:
Opening Xcode, going to Preferences > Downloads and clicking the install button next to 'Command Line Utilities'
Going to developer.apple.com/downloads, and downloading "Xcode 4.4 Command Line Tools for OSX 10.8" from the Xcode 4.4 category
|
I just updated my MBP to OSX 10.8 and am trying to start a new project with brunch.io which by default uses coffeescript and I prefer javascript so I need to clone the simple js skeleton. So something like this:
brunch new <someprojectname> --skeleton https://github.com/brunch/simple-js-skeleton.git
Which is what I have used previously and it worked fine. But today I am getting the following error:
error: Git clone error: /bin/sh: git: command not found
I really don't know how to fix this...
|
Git clone error after OS X Mountain Lion update
|
I fixed it by changing uses value to
uses: google-github-actions/setup-gcloud@v0
|
Github Actions were working in my repository till yesterday. I didnt make any changes in .github/workflows/dev.yml file or in DockerFile.
But, suddenly in recent pushes, my Github Actions fail with the error
Setup, Build, Publish, and Deploy
Can't find 'action.yml', 'action.yaml' or 'Dockerfile' under
'/home/runner/work/_actions/GoogleCloudPlatform/github-actions/master/setup-gcloud'.
Did you forget to run actions/checkout before running your local
action?
May I know how to fix this
This is the sample .yml file I am using.
name: Release to Development
on:
push:
branches:
- 'master'
jobs:
setup-build-publish-deploy:
name: Setup, Build, Publish, and Deploy
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
# Setup gcloud CLI
- uses: GoogleCloudPlatform/github-actions/setup-gcloud@master
with:
version: '270.0.0'
service_account_email: ${{ secrets.GCLOUD_EMAIL_DEV }}
service_account_key: ${{ secrets.GCLOUD_AUTH_DEV }}
# Configure docker to use the gcloud command-line tool as a credential helper
- run: |
# Set up docker to authenticate
# via gcloud command-line tool.
gcloud auth configure-docker
# Build the Docker image
- name: Build
run: |
docker build -t "$REGISTRY_HOSTNAME"/"$GKE_PROJECT"/"$IMAGE":"$GITHUB_SHA" \
--build-arg GITHUB_SHA="$GITHUB_SHA" \
--build-arg GITHUB_REF="$GITHUB_REF" .
# Push the Docker image to Google Container Registry
- name: Publish
run: |
docker push $REGISTRY_HOSTNAME/$GKE_PROJECT/$IMAGE:$GITHUB_SHA
# Set up kustomize
- name: Set up Kustomize
run: |
curl -o kustomize --location https://github.com/kubernetes-sigs/kustomize/releases/download/v3.1.0/kustomize_3.1.0_linux_amd64
chmod u+x ./kustomize
# Deploy the Docker image to the GKE cluster
- name: Deploy
run: |
Here's the snippet of error.
|
Github Actions Failing
|
One peculiarity of Bitbucket's Markdown "flavour" is the way it names heading identifiers. If you inspect the HTML source of your Bitbucket README page (by default accessible at https://bitbucket.org/<username>/<reponame>), you'll see that the Markdown section
## 1. Git To Work - Wording with git
translates to the following HTML heading element:
<h2 id="markdown-header-1-git-to-work-working-with-git">1. Git To Work - Working with git</h2>
Note that Bitbucket uses, as the value of the id attribute, a URL-friendly version of your heading, prefixed by markdown-header-. Therefore, you can create a link to the corresponding section, in your Markdown code, using
[Link to Git](#markdown-header-1-git-to-work-working-with-git)
|
I'm trying to create a link to a section of the README file of my Bitbucket repository. The following works as expected on GitHub, but not on Bitbucket. What am I doing wrong?
## Navigation
[1. GIT To Work](#git)
...
## 1. Git To Work - Working with git<a name="git"></a>
### What is git?
|
How can I link to a Markdown section of my Bitbucket README?
|
You can now use the actions/cache/save action to save the cache right after it is populated, and before any tests (or anything that might fail the job) runs. This is how issue actions/cache#92 was resolved in the end.
steps:
- uses: actions/checkout@v3
.
. // restore if need be
.
- name: Build
run: /build.sh
- uses: actions/cache/save@v3
if: always() // or any other condition to invoke the save action
with:
path: path/to/dependencies
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
https://github.com/actions/cache/tree/main/save#always-save-cache
|
I am using the GitHub cache action, but I noticed that the no cache will be created if the job fails. From the docs:
If the job completes successfully, the action creates a new cache with the contents of the path directory.
A stripped down version of my workflow YAML file:
name: Build
on: [push]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Setup Node.js
uses: actions/setup-node@master
with:
node-version: '10.x'
- name: Get yarn cache path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Restore yarn cache
uses: actions/cache@v1
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install yarn dependencies
run: yarn install
- name: Build
run: yarn build
I noticed that if my Build step fails the cache post-step will be skipped unnecessarily, which causes the installed dependencies to not be cached. This requires subsequent runs to download dependencies again, slowing down the job.
Is there a way to always cache the dependencies, even when the build step fails?
|
Saving cache on job failure in GitHub Actions
|
GitHub serves static HTML files that are in the gh-pages branch of your repo at http://your_username.github.com/your_repo/. In theory, Maven could be made to do the following:
Commit the release pom.xml.
Generate the JavaDocs to a .gitignore'd directory (so it would be preserved across branch changes).
Checkout the gh-pages branch.
Replace all of the files in the working directory with that of the directory the JavaDocs were copied to
Commit
Checkout the original branch.
Continue with release...
I'm only two days in to using Maven for a few of my projects so this is way beyond my capabilities. I'd be eager to see this implemented either with existing plugins or a custom plugin.
|
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
Although Github provides a nice home for Java open source projects, there are some things that are still missing compared to more mature open source hosting places. I have so far figured out that Sonatype offers Maven repository access for open source projects, which solves one issue; and there are many solutions for user/dev mailing lists.
But one thing I am now trying to resolve is that of publishing automatically generated javadocs for online browsing. Although publishing source jars via Maven helps a bit with IDEs, I still like ability to browse javadocs online without downloading or importing a project. Does anyone know of a good way to achieve this, for projects hosted at Github? (need not be something Github offers, but ideally something that can be automated to happen when release is cut)
|
Making JavaDocs available with GitHub, Sonatype Maven repo [closed]
|
35
CHANGE_BRANCH gives the correct name of the source branch of the PR.
CHANGE_TARGET gives the target name of the PR merge
Share
Improve this answer
Follow
edited Mar 16, 2019 at 6:41
Book Of Zeus
49.7k1818 gold badges174174 silver badges171171 bronze badges
answered Mar 16, 2019 at 6:20
jayasjayas
45144 silver badges44 bronze badges
3
1
Interesting, while this is not mentioned in the multibranch pipeline documentation, the code in branch-api plugin mentions those.
– StephenKing
Mar 16, 2019 at 12:29
What about non-PR builds? I'd like to have a single Jenkinsfile for my builds. Do I then have to detect if CHANGE_BRANCH exists, and then assume it isn't a PR build?
– trusktr
Mar 28, 2019 at 0:11
1
@trusktr Yes, if CHANGE_BRANCH exists, it means it's a PR build. Otherwise CHANGE_BRANCH doesn't exist.
– Jonathan Rioux
Jun 18, 2021 at 15:22
Add a comment
|
|
I'm using Multibranch Pipeline Job in Jenkins.
How do I find the branch name from which the Pull Request is raised in GitHub?
I'm using /github-webhook/ & also tried with /ghprbhook/ and tried with the following environment variables: GIT_LOCAL_BRANCH, GIT_BRANCH, ghprbSourceBranch, but I didn't get any result.
If there are any suggestions, I would love to try them.
|
GitHub Branch name from which the Pull Request is raised
|
25
This has worked for me:
I have reset the head to the number of commits back by 2
git reset --hard HEAD~2
and force pushed my branch to remote by
git push -f origin my_branch_name
I could not see any traces of the commits on remote repo.
Share
Improve this answer
Follow
answered Jul 31, 2017 at 11:34
nj2237nj2237
1,24033 gold badges2323 silver badges2626 bronze badges
2
5
This removes the commit from the branch but does not completely delete the commit and it would still visible on github.com. The url for the commit would be github.com/user-name/my-repo/commit/abcdef0 where abcdef0 is the commit hash (shortversion).
– Robino
Apr 29, 2022 at 13:42
Interesting thing is, that pycharm does not allow to force push master, but the command git push -f master worked...
– Raymond Reddington
Dec 20, 2023 at 9:48
Add a comment
|
|
On GitHub, I forked a repositary and cloned on my PC. Then, for testing purpose, I edited a file, made a commit and pushed it to GitHub. But now I would like to completely delete this commit.
I did the following:
git reset --hard <sha1_of_previous_commit>
git push --force
It looked OK, but my commit was still accessible on GitHub by URL with SHA1 of my commit. So I deleted the repositary on GitHub, then the URL was saying Not Found.
But if I fork the same repositary again, my commit is again accessible by this URL. Please help me, how the hell I can get rid of this commit?
|
How to completely delete a commit from GitHub?
|
You have the below 2 options, Based on your preferred way (ssh or password) based access to git account:-
SSH based access:- create 2 ssh key-pairs one for your company git account and one for your own git account. you need to add public ssh keys on both the git accounts by following this article.
Password based access :- In this case you don't need to do anything, you just need to give the username and password on git push etc.
Important:- Now you need to add the git configs (git username, email etc) for your system, git has option to set these at global and local leval. I would recommend setting the user.email and user.name setting globally according to your organization, to avoid commits to your company repo which has your private git username and email.
For example below git command will show the global setting of git :-
git config --global --list
user.name=<firstname.lastname>
user.email=<company mail address>
And to set the git username and password in your private git repo, use below command, inside your repository
git config --local user.name "amit"
git config --local user.email "[email protected]"
You can confirm, that your own private repo does not have, your company username and password by running git config --edit command or git config --local --list.
|
Local Repository-1
I have been working on application for my organization whose git repository cloned at C drive folder.
I have set global configurations, and I have been able to perform commit, push, pull operations. This is private repository of my organization with unique user name, password and url. Everything working fine this repository.
Problem
Local Repository-2
Now, I want to create local repository of my own github project (different from first one) on the same system, but on different location. This repository have different configurations than other repository on the same system. So my concern is, how can I maintain repository specific configurations(user name, password, urls) on the same client system.
|
How can I config two different git repo with different credentials in one system?
|
I know this was writen much later then asked for, but for future reference
Try this as a starting place,
1: Go to your account on github and create the repo you want to use. Maybe add a md file.
2: Then in Aptana, File - Import - Git - Git Repository as New Project, follow directions on screen for github username & password and the url for the repo (you can go to your github account and copy the url ('https://github.com/userName/repoName.git')
3: Do some work in Aptana, add files, folder, etc. then in Aptana's project browser right click on the project name, team - stage, commit, push (in that order)
4: Go to github and marvel at your new work
I am doing this from a windows machine, but it should be similar on Mac
|
I'm new to Git. I use Aptana 3 for everything and I really want to use it when working with Git as well. The problem I'm running into is that everything I read seems geared towards people who know Git or have an idea of what is going on. I have neither. I've never even used GitHub before not even to clone a project.
As far as I've gotten with the Aptana setup is going into the preferences and setting the path to my git executable. I've restarted it and everything and it appears to have accepted this new path, however, there is nothing different. From reading some of these forums I'm supposed to have access to git commands now, which I have a "commit" command, but no push or pull.
Is there a step-by-step documentation out there, website tutorial, anything for Git noobs and Aptana 3? I spent the day trying to figure it out and my shop really wants to have it set up and running tomorrow for our current project. They've never used it either so are learning how to set it up on their Linux machines. It's up to me to figure it out for the Mac.
I know my issue stems a bit farther then just getting it set up but for now I'd be satisfied in knowing that I have it proper and can push and pull from the central repository once I get that set up as well.
So tutorial, hand-holding, anything available out there? Thanks.
|
How to set up Git with Aptana Studio 3?
|
19
I solved the issue with "Credential Helper".
Navigate from Android Studio -> Preferences -> Version Control -> Git,
then tick the check box of "Credential Helper" -> Ok. Now, try to push again
Share
Improve this answer
Follow
edited Aug 19, 2022 at 2:25
answered Jul 16, 2022 at 4:09
fahrizal89fahrizal89
72966 silver badges1414 bronze badges
Add a comment
|
|
I am trying to push within Aptana but am getting the following error. I have successfully pulled, but can't figure out why my push won't work.
/home/jeni/apps/Aptana_Studio_3/plugins/com.aptana.git.core_3.0.0.1350339960/os/linux/askpass. tcl: 3: exec: wish: not found
error: unable to read askpass response from '/home/jeni/apps/Aptana_Studio_3/plugins/com.aptana.git.core_3.0.0.1350339960/os/linux/askpass.tcl'
fatal: could not read Username for 'https://github.com': No such device or address
|
Github push error. unable to read askpass & could not read Username
|
18
GitHub doesn't have such a feature as Bitbucket has, but still, you can't make fork from a private repository public. You'll see this message:
Private forks can't be made public.
It gives you a "fool protection" when somebody want's to publish your private repo. Of course, if somebody really want's to do this, they always can push all the code to some new repo as @Chris stated above.
Share
Improve this answer
Follow
answered Mar 18, 2015 at 8:58
DmytroDmytro
5,54122 gold badges5454 silver badges5050 bronze badges
Add a comment
|
|
It was easy on bitbucket. if I dont want my repo to be forked. I can disable it. Only people I have invite can work on repo as long as they have permission on repo.
But where is that functionality in github. I have enterprise repo and I want invite people work on it. but dont want them to fork it.
I might have missed something, google search didn't bring anything useful.
Can anybody point me in right direction please ?
Thanks in advance for your time.
|
How to disable fork on private repo on github
|
To clone a repository means to duplicate and download everything in the repository.
You are on a Mac, so launch Terminal, create a folder and type this command:
git clone git://github.com/facebook/facebook-ios-sdk.git
It will duplicate and download the entire repository.
|
I am trying to integrate Facebook with my app. I read this on developers.facebook.com:
Install XCode
Install Git
Clone the GitHub repository with this command:
git clone git://github.com/facebook/facebook-ios-sdk.git
I have installed XCode and Git.
What does it mean to clone a GitHub repository and how can I do that?
|
What does cloning a GitHub repository mean?
|
This error message is an HTTP 404 Not Found error. Essentially, that means that Git LFS tried to pull down the file, but it wasn't there. In all likelihood, the user did not upload it properly, possibly because they didn't run git lfs install. If they had run that command, the pre-push hook installed in their repository would have pushed the files to the server before the Git objects were uploaded.
Since the files weren't uploaded, there's no way for you to download them. You'll have to ask the author to run git lfs push --all in their repository to upload them to the proper location so they can be downloaded.
|
I downloaded and installed Git Large File Storage. Now I'm trying to get lfs files from the existing repository in github (not mine).
I tried:
git lfs clone https://github.com/xxx/xxx
then in my local just cloned repo:
git lfs fetch --all
git lfs pull
I also tried the same but without "lfs".
The repository is cloned but for all lfs files always this error is shown:
[301582dabd8c6ac7bdf626c7e4a1d64c8f9665b65b6334b44642bdfb78054575] Object does not exist on the server: [404] Object does not exist on the server
and then:
error: failed to fetch some objects from 'https://github.com/xxx/xxx.git/info/lfs'
As a result, instead of real large files, their small pointers that can be seen in GitHub itself are cloned.
At the same time this command:
git log --all -p -S 301582dabd8c6ac7bdf626c7e4a1d64c8f9665b65b6334b44642bdfb78054575
gives the following results:
commit 36c7dba69de90d99f0c305fce13a598b8f06b443
Author: xxx
Date: Wed Sep 11 18:01:25 2019 +0200
Add embeddings
diff --git a/embeddings/wikipedia/0.pkl b/embeddings/wikipedia/0.pkl
new file mode 100644
index 0000000..5ee94da
--- /dev/null
+++ b/embeddings/wikipedia/0.pkl
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:301582dabd8c6ac7bdf626c7e4a1d64c8f9665b65b6334b44642bdfb78054575
+size 588838774
I am not very confident user of GitHub, especially, of LFS. So, the question is: am I doing something wrong or does it indeed mean that the files do not exist on the server?
|
Error when getting git LFS files: Object does not exist on the server: [404] Object does not exist on the server
|
No, you do not get a notification if a comment, issue title, or description is edited or even deleted. This can get very confusing if you are answering via email and quote non-existent text.
There is an issue requesting this feature but it has been open for ~2 years without activity. Maybe giving that proposal a thumbs up could help. Unfortunately, no one will be notified of that reactions either...
|
For the people who have configured to receive notifications when a comment is posted to an issue in a Github repo: do they also get sent another notification if that comment is edited?
|
Does Github send a notification when an issue comment is edited?
|
If what you want is using Github App for pushing your code to Bitbucket what you need to do is going to "Settings" (in your local repo) and change your Primary remote repository (origin) to point to Bitbucket in your Github App. Then you can Sync Branch.
|
Is it possible to use GitHub Desktop application to commit to a Bitbucket repository?
If yes then where I need to add in GitHub? I see "Clone in Sourcetree" option, but I want to clone in GitHub Desktop. Is it possible?
|
Is it possible to use GitHub Desktop application to commit to Bitbucket repository?
|
You can try to use Github-Changelog-Generator. (I'm author of this project)
It generates changelog from tags and merged pull-requests.
This script also have a support of GitHub Issues.
This changelog was generated by this script. CHANGELOG.md
Example:
Changelog
1.2.5 (2015-01-15)
Full Changelog
Implemented enhancements:
Use milestone to specify in which version bug was fixed #22
Fixed bugs:
Error when trying to generate log for repo without tags #32
Merged pull requests:
PrettyPrint class is included using lowercase 'pp' #43 (schwing)
support enterprise github via command line options #42 (glenlovett)
|
Is there a way to automatically generate a change log from Github issues?
Ideally I want to be able to point at a closed milestone and generate either a plain text list of closed issues with their titles or, even better, a list with markup for links to the issues and the title of the issues themselves.
|
Changelog generation from Github issues?
|
Resolved. As globally installed node modules end up under /usr/local/bin I simply needed to add the following at the beginning of my pre-commit:
PATH=$PATH:/usr/local/bin:/usr/local/sbin
i.e. appending both /usr/local/bin and /usr/local/sbin to PATH at the point of execution.
|
I've created a very simple pre-commit script:-
#!/usr/bin/env sh
# Run tests
npm test
if [ $? -ne 0 ]; then
echo "Tests failed. Aborting.."
exit 1
fi
exit 0
When I run git commit at the command line (with failing tests), I get the expected exit 1 with the message Tests failed. Aborting...
However, If I use GitHub for Mac however I get:
.git/hooks/pre-commit: line 5: npm: command not found
Tests failed. Aborting..
(256)
I'm guessing its down to npm not being available to the execution environment that GitHub for Mac is using, but I've been tearing my hair out trying to work out how to fix this.
|
Git pre-commit hook failing in GitHub for mac (works on command line)
|
Got it sorted out by following this link http://www.eclipse.org/forums/index.php/t/197428/.
I created an environment variable GIT_SSH which points to /usr/bin/ssh (which was the SSH implementation I was using in command line) and started Eclipse. When this environment variable was present, Eclipse connected using my shell's SSH tool and there was no prompt for pass phrase and it worked fine.
|
I am using Eclipse Indigo RC4 with EGit (bundled). I have a project which I have committed to my local repository, and now I want to push from that to a remote repository I have in GitHub.
Pushing / Pulling from the command line tools works fine (I have configured RSA key based SSH authentication).
But when I try to push from EGit (via SSH pointed to GitHub), I get a prompt to enter my pass phrase. But when I enter the correct pass phrase, it prompts again for the same (note: username appears as git because that's the default when using GitHub. I guess that wouldn't be a issue).
Under Eclipse preferences, I have double checked to ensure that it is configured to use the RSA tokens I have generated.
|
EGit - SSH Fails at Passphrase (when connecting to GitHub)
|
As you can see on the Github Help Pages about possible references, there is no auto-linking for milestones as of today.
|
I use to add issue numbers in Git commits, to let Github make links from commits to issues and from issues to commits.
Is it also possible to do the same in tag messages towards milestones?
In my project, each release has a tag, and each release consists of a number of issues that are grouped in a milestone. Therefore a linked reference from the tag message to the milestone would be very useful.
|
Linked reference to a Github milestone in a tag or commit message
|
Setting an HTTP or HTTPS proxy will not work, because Tor acts on port 9050 as a SOCKS proxy. What will work instead is the software socat with some settings inside your SSH config:
Host github
HostName github.com
IdentityFile /path/to/your/file
User git
ProxyCommand socat STDIO SOCKS4A:127.0.0.1:%h:%p,socksport=9050
Your SSH settings usually live in ~/.ssh/config. The configurations above tell SSH settings for the host github. It takes your input and directs it via socat through Tor.
Now you can do a git COMMAND ssh://github/USER/REPO and git will do your COMMAND via Tor.
|
So, GitHub is now officially banned by Russian Government and Rospotrebnadzor. I used GitHub to create free software and share it, and it's important part of my life.
Today I've installed Tor on Arch Linux and now I'm able to browse GitHub and other banned sites. I tried to make git work via Tor but without success.
Here is what I did:
git config --global http.proxy localhost:9050
git config --global https.proxy localhost:9050
But when I try to push, I get error 501:
fatal: unable to access 'https://[email protected]/X/X.git/': Received HTTP code 501 from proxy after CONNECT
So, 501 means 'not implemented'. I have little experience with Tor (but from now on I'm starting to appreciate it), so don't know if it's really impossible to use Tor this way or I'm doing something wrong.
Q: how to configure git to use it via Tor?
|
How to make git work to push commits to GitHub via tor?
|
If GitHub wanted to provide this information, I would expect it to be provided in the API. The GitHub API doesn't currently provide this information. If they did, I would expect it to be here:
https://api.github.com/repos/jbeder/yaml-cpp/releases/latest
More info: https://developer.github.com/v3/repos/releases/#list-assets-for-a-release
If you'd like the feature added, you could get in contact with @github. You could send them an email.
|
I am looking to get the MD5 hash for a tar.gz GitHub release from here:
https://github.com/jbeder/yaml-cpp/releases
Would like to use it in my CMake. Does anyone know where I can get it? I could not find much of a solution through Google.
|
Where to get MD5 hashes from a GitHub release?
|
gh-pages are ignored because most people want travis to ignore them.
|
I had two branches (master and gh-pages) in github git repo https://github.com/larrycai/LASO
According to the document http://about.travis-ci.org/docs/user/build-configuration/ , if the .travis.yml file exists in the branch, it will be triggered on all branches
While currently it is triggered for build in master branch only, see https://travis-ci.org/#!/larrycai/LASO/branch_summary
Do I must set white or black list in .travis.yml even I want to build for all branches.
|
travis-ci triggers build only for master branch in github repo
|
I found two solutions:
ohloh: you can put your project on the site and it will analyze your source code and provide some interesting statistics
GitStats: a simple statistics generator for any Git repository on your computer
|
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I've several GithHub projects and I wanted to know the metrics of these projects.
Is there a tool to generate metrics for a given GitHub project? Even very basic metrics like LOC would be enough (even though more complete metrics would be appreciated).
I just discovered that there was a great service, Caliper, doing that, but that has been closed. Is there another services of this kind?
|
Is there a way to generate metrics for a GitHub project? [closed]
|
For some reason zavr's answer (using README and README.md) didn't work when I tried it (probably the logic used by NPM has changed). But what did work is putting the GitHub README into .github directory (this is allowed according to their docs), and using the root README.md as the version for NPM along the lines of
<!-- README for NPM; the one for GitHub is in .github directory. -->
<badges>
<a brief description>
Please refer to the [GitHub README](https://github.com/<your repo>#readme) for full documentation.
Luckily, for GitHub .github/README.md seems to take priority over README.md.
Update 2021-02-06: a quick note about best practice. NPM wouldn't let you update the readme without bumping the package version, and in reality you often need to make updates, sometimes minor, to the docs. So I'd recommend to provide full docs in the GitHub readme, but still give a short description of the library on NPM, which in combination with keywords field of package.json will make the package more discoverable. It's also a good idea to include badges in the NPM readme because that will increase the quality score displayed by NPM (see discussion of "branding" score in this article).
|
Both use the README.md as the description when you publish. A common practice is to use a single shared file.
But what if I need to have the different Readme and still publish it from a single local repo with no manual editing/replacement
PS
I tried to use "readme": "npm-readme.md" in package.json but it displays a value of this field, not the content of а file
|
How to specify different readme files for github and npm
|
While it's not possible to host fully-fledged Shiny apps on Github pages (Indeed, as @Gregor suggested, shinyapps.io is useful for this), the devs for Shiny have been working to make some of the functionality run completely on the client-side via htmlwidgets.
Here is a simple example running on Github pages:
README.Rmd
## Example of displaying htmlwidgets on a Github pages site
```{r}
# Source: http://www.htmlwidgets.org/showcase_plotly.html
library(plotly)
p <- ggplot(data = diamonds, aes(x = cut, fill = clarity)) +
geom_bar(position = "dodge")
ggplotly(p)
```
Rendered HTML
(Live version: Github pages htmlwidget demo)
For more complex interactions, including communicating between widgets entirely on the client-side, check out Joe Cheng's recent crosstalk demo from UserR! 2016.
|
As the title says, I would like to create posts on Github Pages that are interactive R Markdown files (meaning that it has Shiny apps embedded in it). Is this possible to do in Github Pages? If so, how can I do it; and if not, what's the best (free) way to host interactive RMD/Shiny pages?
|
Is it possible to host interactive R Markdown files on Github Pages?
|
Any image that would render in a GitHub README.md file (or other rendered HTML format) will be rendered using camo. There are several reasons for this. One is performance: GitHub serves a lot of users, and page load times would be bad if they didn't. Another is privacy: letting repo owners embed tracking images would be unacceptable. And finally, there's the DDoS angle: hosting images externally permits a malicious repository owner with a reasonably popular repository to DDoS any site they choose simply by loading one of its images.
There isn't a way to disable camo because it's built into the rendering pipeline. It isn't specific to Markdown; it will also apply to raw HTML files, AsciiDoc, and anything else that produces HTML. You can provide some sort of dashboard via a link or use links in some other way, or somehow via a data: URL, but otherwise, as far as images go, if it's rendered as part of file content, it's going to go through camo.
Even if you could somehow trick the rendering pipeline into allowing an unproxied image through, the Content-Security-Policy header would prevent it from being rendered in your browser, and your browser would report it as a security violation to GitHub.
|
I have a self-hosted SonarQube instance, behind a proxy.
I want to include the badges on my private GitHub repo's readme.md. This repo is only accessed by individuals behind the proxy so they won't have issues viewing the images.
However, GitHub is converting them to URLs like https://camo.githubusercontent.com/blahblahblah.
These all render as broken images, checking the console camo.githubusercontent.com is returning 404s for my images, presumably because camo can't see the images.
I understand Github does this for reasons of anonymity and caching but it's quite annoying. Searching online reveals a lot of frustration with GitHubs behaviour on this but it's mostly aimed at their excessive caching and the solution seems to be setting headers by the image provider. However, we don't want to expose the images to camo.githubusercontent.com or anyone else.
I have tried adding images using markdown format and <img src=""> but no dice.
How can we get GitHub to serve images that GitHub can't see, but the client can?
|
Github image without camo
|
27
Suppose your project is called SomeProject library and you need branches qa and dev besides default master. Here's what you do:
git clone https://github.com/someperson/someproject.git
cd someproject
git checkout -b qa origin/qa
git checkout -b dev origin/dev
Now your local branches qa and dev track corresponding remote branches, and you can check them out:
git checkout qa
git checkout dev
Share
Improve this answer
Follow
edited May 17, 2023 at 4:32
Sahil Raj Thapa
2,42333 gold badges1313 silver badges2525 bronze badges
answered Aug 27, 2015 at 10:31
Dmitry VSDmitry VS
61555 silver badges1515 bronze badges
1
1
git checkout qa and git checkout dev should suffice.
– Biffen
Aug 27, 2015 at 10:32
Add a comment
|
|
This question already has answers here:
How do I check out a remote Git branch?
(43 answers)
Closed 8 years ago.
I am asked to take clone of project repository from GitHub server.
There are three branches on server: master, qa and dev.
After taking clone to the project, how can I checkout qa or dev branch as both the branches are not on my local machine?
I tried the command
git checkout qa
it raised an error
$ git checkout qa error: pathspec 'qa' did not match any file(s) known
to git.
|
How can I pull remote directory first time? [duplicate]
|
we get lots of conflicts even though people are changing different
lines
This shouldn't be the case, you only get conflicts if same line is modified by different people, committed and then later merged.
Oh, I actually tried this out and encountered some odd problems.
Commit 1 (master):
{
"a": "1",
"b": "2",
"c": "3",
"d": "4",
"e": "5",
"f": "6",
"g": "7"
}
Commit 2 (tmp)
{
"A": "1",
"B": "2",
"C": "3",
"d": "4",
"e": "5",
"f": "6",
"g": "7"
}
Commit 3 (master):
{
"a": "1",
"b": "2",
"c": "3",
"d": "4",
"E": "5",
"F": "6",
"G": "7"
}
git merge tmp: correct result
{
"A": "1",
"B": "2",
"C": "3",
"d": "4",
"E": "5",
"F": "6",
"G": "7"
}
However I get conflicts if also row "d" was modified, maybe git wasn't able to establish diff boundaries. My stupid suggestion to avoid this stupid git behavior is to add "padding" to the JSON file (ugly, isn't it? But no more conflicts):
{
"a": "1",
"b": "2",
"c": "3",
"d": "4",
"e": "5",
"f": "6",
"g": "7"
}
|
Our website is localized using a bunch of JSON files with translations (one file per language). The content of the files looks like this:
{
"Password": "Passwort",
"Tables": "Tische"
}
Many team members edit these JSON files at the same time, adding new phrases and editing existing ones, and we get lots of conflicts even though people are changing different lines.
Is there a way to set up git in such a way that would help avoid merge conflicts?
P.S. I've found this script to help merge locally: https://gist.github.com/jphaas/ad7823b3469aac112a52. However, I'm interested in a solution that would fix the problem for everyone in the team (even for persons who edit JSONs through GitHub's web-interface).
|
Git conflicts with JSON files
|
I had asked the similar question to Github that
Is there anyway to suppress using .gitattributes the diff of machine
generated codes which needs to be versioned and cannot be ignored by
using .gitignore file?
The reply from them was
GitHub doesn't use .gitattributes files for choosing which files to
show in a diff, so it's not possible to get around this that way.
The only current way to suppress certain files in a diff, is to have
the classified as "generated" by Linguist:
https://github.com/github/linguist#generated-file-detection
If you want to do that, you would need to check out the details of how
Linguist classifies files as "generated" and make sure that your files
qualify. I cannot say whether this is doable for the specific files
which you are interested in suppressing from the diff.
So, for now Github does not support .gitattributes file to suppress any diff.
|
In my project, I need to track some files into version control, csv files in this example. But the files contain a considerable amount of lines and cause Github to occasionally supress files that must go through code review for pull requests to be accepted and merged.
I tried using .gitattributes to mark such files either as binaries or just to not being diplayed in the diff using:
+*.csv -diff
+*.csv -merge
+*.csv binary
one at a time, as well as combining them. This works perfectly on diffs on the terminal:
$ git diff HEAD^
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000..8a86f80
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1 @@
+*.csv -diff -merge binary
diff --git a/AssetsImportCompleteSample.csv b/AssetsImportCompleteSample.csv
new file mode 100644
index 0000000..5b20a6e
Binary files /dev/null and b/AssetsImportCompleteSample.csv differ
but when the branch is pushed to Github and compared against another branch, Github ignores these attributes and displays the file diff as text, though .gitattributes is "customizing" the way the diff should be displayed:
Is there any way to force the diff in Github consider the attributes in .gitattributes to customize the behavior of the diff so that the diff of the indicated files is supressed?
Thanks in advance!
|
Make github use .gitattributes "binary" attribute
|
Files that you add to a repository via a browser are limited to 25 MB
per file. You can add larger files, up to 100 MB each, via the command
line.
Refer this page.
If you need to upload greater file than 100 mb then Git LFS might be suitable for you.
|
I have a file that I want to add to Github. Its size is more than 25 MB limit of github. It is a csv file. How can I upload it on Github.
Steps followed till now
$ cd path_of_directory
$ git lfs install
$ git lfs track "*.csv"
$ git add Filename.csv
$ git commit -m "Filename.csv"
Till here everything is fine. I get below success message:
$ git commit -m 'FileName.csv'
[master (root-commit) 3f089ff] FileName.csv
1 file changed, 3 insertions(+)
create mode 100644 Downloads/Folder_of_file/FileName.csv
$ git push origin master
This gives error
fatal: 'origin' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
|
Upload file > 25 MB on Github
|
10
Actually you have 2 problems here: First is that you don't have ssh installed, second is that you don't know how to deploy
Install SSH
It seems that ssh is not installed on your computer.
You can install openssh from here : http://openssh.en.softonic.com/download
Generate your key
Than you will have to geneate your ssh-key. There's a good tutorial about this here:
https://help.github.com/articles/generating-ssh-keys#platform-windows
Deploy
To deploy, you just have to push your code over git. Something like this:
git push fort master
If you get permission denied, be sure that you have put your public_key in the dashboard in the git tab.
SSH
The ssh command gives you access to your remote node. You should have received a password by email and now that you have ssh installed, you should be asked for a password when trying to connect. just input that password. If you want to use your private ssh key to connect to your server rather then typing that password, you can follow this : http://fortrabbit.com/docs/how-to/ssh-sftp/enable-public-key-authentication
Share
Improve this answer
Follow
answered Jun 11, 2014 at 10:35
edi9999edi9999
20.1k1313 gold badges9292 silver badges131131 bronze badges
2
7
I understand softonic also packages malwares along-with binaries.
– Adelin
Apr 20, 2018 at 8:00
Not softonic, please!
– Javier Paz Sedano
Nov 24, 2023 at 13:45
Add a comment
|
|
I have been trying to deploy my app into the Fortrabbit servers using the command line. I'm using windows. Here is what I tried :
C:\projects\riwaya>git remote add fort [email protected]:riwaya.git
C:\projects\riwaya>git remote fort
C:\projects\riwaya>ssh [email protected]
'ssh' is not recognized as an internal or external command, operable program or batch file.
I have watched This Laracast Video and did the same as Jeffrey but it doesn't work ...
Can somebody help ?
|
'ssh' is not recognized as an internal or external command
|
15
The graphQL API of GitHub could help you to get pull requests metadata such as when the PR has been created (createdAt) and when it have been merged (mergedAt) https://developer.github.com/v4/object/pullrequest/
You could search all pull request with the search query https://developer.github.com/v4/query/#connections then compute the time to merge.
Also you might be interested in this tool https://github.com/change-metrics/monocle as it provides Pull Request metrics for GitHub repositories. Among other various metrics the tools computes the "Mean time to merge" metrics. Thanks to the filters you could set, you could get the mean time to merge for the whole GitHub organization, a specific repository, or developer, or a group of developers.
Share
Improve this answer
Follow
edited May 14, 2020 at 7:26
answered May 14, 2020 at 7:13
FboFbo
16.7k11 gold badge2020 silver badges1111 bronze badges
2
1
Monocle sounds neat - I should give it a shot. I guess it could also work for stash repos too, no?
– PhD
May 14, 2020 at 20:23
@PhD From what I understand about stash, I guess no as monocle provide crawlers for GitHub and Gerrit only at the moment. It seems stash and bitbucket are the same, well that might be a good addition in monocle to add the bitbucket crawler.
– Fbo
May 15, 2020 at 6:58
Add a comment
|
|
We use GitHub Enterprise for our internal code base. A common issue that we face across teams is the "pull-request review turnaround time" can sometimes be a few "physical days" (many ideal hours).
We're tweaking some engineering practices to prevent PRs from being unnecessarily large and allow for faster turnaround times on reviews. However, I couldn't find anything to help accurately track how long PRs were open before they were merged.
We'd like to use objective metrics to validate some of our approaches to see if we make meaningful differences to the review times and "open-PR duration till merging" is an important metric to track.
Does git/GitHub have anything that could help obtain such metrics? I tried looking but nothing shows up anywhere.
|
How can I track how long pull requests have been open on GitHub?
|
I ended up using Sandcastle to generate plain HTML and using that. Inevitably, I'll just write my own parser or a custom template for Sandcastle.
I didn't like the learning curve for Doxygen or QDoc.
|
Closed. This question is seeking recommendations for software libraries, tutorials, tools, books, or other off-site resources. It does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for software libraries, tutorials, tools, books, or other off-site resources. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I want to generate API documentation for my open source project on Github. I'd like to create them automatically from my XML Documentation Comments in my C# projects. My feeble googling has turned up bubkiss. Is there a way to do this?
I'd prefer it be in Github-style Markdown.
|
Is there a way to generate a documentation wiki for github from my XML documentation comments in C#? [closed]
|
Not yet, though this is an accepted issue (star it!).
Google Code was discontinued on March 12, 2015!
|
Does Google Code (svn or git) has any thing comparable to GitHub pull request so that other can easily contribute to a project?
|
Does Google Code have anything comparable to GitHub pull requests?
|
If GitHub is still using github/gollum, then, as explained in "How can you use subdirectories in a GitHub wiki checkout?", subfolders are not supported (or were buggy at the time of the fork).
More recent versions of gollum/gollum supports that organization, even though recent PR (Pull Requests) are still fixing issues around it (like PR 787).
The OP tsega adds in the comments:
tried to look into the Gollum wiki myself and it turns out you can organize your files under directories but that will not be how you access them.
Every page is accessed from the root of the wiki,e.g. github.com/user/repo/wiki/file-name not github.com/user/repo/wiki/directory/file-name.
The file names should be unique, and if you want to have proper titles they need to be capitalized and dashed (not underscored).
|
I have cloned one of my GitHub project's wiki locally, and I want to restructure the file system. By default different pages added to the wiki are all created in the parent directory:
/wiki
home.md
wiki_page_1.md
...
I want have a directory structure similar to this:
/wiki
/setup
setup_procedures.md
index.md
/development
index.md
tools.md
/images
front_page.png
I've tried to structure my wiki files similarly, but it's not working for the .md files. However, it works for the images folder. Is there a way to make this work?
|
How to structure GitHub wiki files?
|
There is a bug report available for the broken git svn command, see https://github.com/git-for-windows/git/issues/3392 and https://github.com/git-for-windows/git/issues/3403.
Try the latest git for windows snapshot, look here https://wingit.blob.core.windows.net/files/index.html).
|
git svn command is not working in windows. I have downloaded the latest stable version(2.33.0.2) of git for windows. I'm getting the following error while executing the git svn command.
It is strange to see that it is looking for Perl libraries in unix style path while on windows.
Please help me resolve the issue.
Error message after executing git svn:
Can't load '/usr/lib/perl5/vendor_perl/auto/SVN/_Core/_Core.dll' for
module SVN::_Core: No such file or directory at
/usr/lib/perl5/core_perl/DynaLoader.pm line 193. at
/usr/lib/perl5/vendor_perl/SVN/Base.pm line 59. BEGIN
failed--compilation aborted at /usr/lib/perl5/vendor_perl/SVN/Core.pm
line 5. Compilation failed in require at C:/Program
Files/Git/mingw64/share/perl5/Git/SVN/Utils.pm line 6. BEGIN
failed--compilation aborted at C:/Program
Files/Git/mingw64/share/perl5/Git/SVN/Utils.pm line 6. Compilation
failed in require at C:/Program
Files/Git/mingw64/share/perl5/Git/SVN.pm line 32. BEGIN
failed--compilation aborted at C:/Program
Files/Git/mingw64/share/perl5/Git/SVN.pm line 32. Compilation failed
in require at C:/Program Files/Git/mingw64/libexec/git-core\git-svn
line 64. BEGIN failed--compilation aborted at C:/Program
Files/Git/mingw64/libexec/git-core\git-svn line 64.
|
Not able to run git svn command in windows
|
If I run:
> curl https://api.github.com/legacy/repos/search/Go?language=Go
{
"repositories": [
{
"type": "repo",
"username": "mattn",
"name": "go-gtk",
"owner": "mattn",
"homepage": "http://mattn.github.com/go-gtk",
"description": "Go binding for GTK",
"language": "Go",
"watchers": 342,
"followers": 342,
"forks": 67,
"size": 416,
"open_issues": 34,
"score": 54.450714,
"has_downloads": true,
"has_issues": true,
"has_wiki": true,
"fork": false,
"private": false,
"url": "https://github.com/mattn/go-gtk",
"created": "2009-11-26T16:58:53Z",
"created_at": "2009-11-26T16:58:53Z",
"pushed_at": "2013-09-02T04:29:39Z",
"pushed": "2013-09-02T04:29:39Z"
}
]
}
<TRIMMED>
Which seems to be the nature of the response you are looking for.
Also, on the latest version of the API, you can try:
curl -H 'Accept: application/vnd.github.preview.text-match+json' https://api.github.com/search/repositories?q=language:go&order=desc
Without the media type, you'll get:
{
"message": "Not Found"
}
But with the -H media type in the request, you'll get a proper response.
On Windows:
c:\prgs\git\PortableGit-1.8.3-preview20130601\bin\curl.exe -H "Accept: application/vnd.github.preview.text-match+json" https://api.github.com/search/repositories?q=language:go&order=desc
(note the " instead of ' around the header Accept)
|
I was able to get all github repositories tagged with a given language in JSON format with the v2 of the github API, but this version has been deprecated last year. I can't find any way to do this with the new v3.
Any ideas?
|
Github API: How to get all repositories written in a given language
|
The permission for pushing seems to be Contents.
The alternatives to a fine-grained token are:
Use a classic token. Fine-grained tokens are still in Beta
Use Github cli and gh auth login with its web browser authentication(the browser is launched from the console).This approach doesn't suffer from the problem of expired tokens, but please be aware that for some setups gh auth login writes oauth_token to .config/gh/hosts.yaml even without passing --insecure-storage
|
I got fatal: Authentication failed for 'https://github.com/Username/X.git/' after inputting the correct username and password.
I read this https://github.blog/changelog/2021-08-12-git-password-authentication-is-shutting-down/ and think I should create a personal token.
I created a fine-grained personal access token but when I tried to git push -u origin main I got The requested URL returned error: 403.
When I created my fine-grained personal access token I didnt select any user permissions or repository permissions because I dont know what any of them means. Did this cause the problem? what permissons should I choose?
There are so many permissions and it looks so confusing.
|
What permissions should I choose for github fine-grained personal tokens?
|
16
There is no automatic page generator button in GitHub anymore, I am not able to find it in any of my repos. GitHub now uses Jekyll to make the pages.
Instead, you can do the following to create a GitHub webpage:
Go to github.com/YOUR_REPO_NAME/settings/ then scroll down to the GitHub Pages section and select the "Choose a theme" button. Then choose a theme and select the green "Chose theme" button. Now create an index.html in the master branch and create your page there.
Share
Improve this answer
Follow
edited Dec 20, 2016 at 19:12
answered Dec 20, 2016 at 18:40
William V.William V.
54755 silver badges2525 bronze badges
7
so we have to upload .html files, and there is no way to upload markdown files and have github apply the selected style?
– Benni
Dec 30, 2016 at 13:33
3
You can now go back to the same place and press the Choose theme button, and it will work the exact same way it used to! You just can't make a gh-pages branch anymore.
– William V.
Jan 5, 2017 at 1:27
4
The video at pages.github.com still mentions the automatic page generator
– Kirsten
Mar 5, 2017 at 5:09
4
September 2017 and the same video is still there. Not a great introduction for the new GitHub Pages users that it is aimed at.
– Vince O'Sullivan
Oct 4, 2017 at 6:20
3
2020 and the video is still not updated. XD
– Pranav Kasetti
Dec 14, 2020 at 13:59
|
Show 2 more comments
|
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
I'm not able to find the "automatic page generator button" under a repository's setting page. Could someone please let me know where I can find the button? Thank you!
|
Can't locate "automatic page generator" button in Github [closed]
|
It could be used to a GnuTLs or pycurl bug
The following is the new method for pycurl_7.19.0-4ubuntu3:
sudo apt-get install build-essential fakeroot dpkg-dev
mkdir ~/python-pycurl-openssl
cd ~/python-pycurl-openssl
sudo apt-get source python-pycurl
sudo apt-get build-dep python-pycurl
sudo apt-get install libcurl4-openssl-dev
sudo dpkg-source -x pycurl_7.19.0-4ubuntu3.dsc
cd pycurl-7.19.0
# remove the HAVE_CURL_GNUTLS=1 in the following file
sudo vim debian/patches/10_setup.py.dpatch
# remove the HAVE_CURL_GNUTLS=1 in the following file
sudo vim setup.py
# replace all gnutls into openssl in the following file
sudo vim debian/control
sudo dpkg-buildpackage -rfakeroot -b
sudo dpkg -i ../python-pycurl_7.19.0-4ubuntu3_amd64.deb
|
The following error appears when I try to clone git repository. I have the rsa public keys configured properly as well.
$ git clone https://github.com/blah/blah.git
Initialized empty Git repository in /home/arun/.git/
error: gnutls_handshake() failed: A TLS packet with unexpected length was
received. while accessing https://github.com/blah/blah.git/info/refs
fatal: HTTP request failed
|
error: gnutls_handshake() failed GIT repository
|
github.job might get you the job name
Link to documentation: https://docs.github.com/en/actions/learn-github-actions/contexts#github-context
|
I want to reference the running job name in one of its steps. These are the options Github gives us: https://help.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions#job-context. The closer one I see is "job.container.id". Would that give me the name I set to the job? It doesn't sound like it. Unfortunately, I can't no longer test this since I exceeded the limit of free Github Actions usage
|
Get current job name in Github Actions workflow
|
You can configure to remote repositories to use in git. In the project cloned from your fork, type the following comand: git remote add name url where name is a alias to a url that represents the master repo.
With that, to bring the new updates from the master repo, just type: git pull name master. To send the changes to your fork repo: git push origin master.
|
I forked a popular github project to make certain minor adjustments for my needs. However I want to keep my fork up to date with the master repo. What I did initially was fork via the github ui, then pushed my changes directly to this fork from my dev env. I'm not entirely convinced I should have done this as I think it makes pulling updates from the master repo difficult.
What's the recommended method for maintaining a fork in this fashion and what do I have to change about my current setup?
|
How to maintain a Github fork of a popular project
|
Just add a comment of your own to the page. If their comment is in the diff (i.e. the "Files changed" tab), you can respond inline next to their original comment.
If you mention them by name (using @username), they should also get a notification telling them that someone has mentioned them.
|
Sorry if the question is trivial, but I couldn't find an answer.
I sent a pull request to a project. Someone commented something about it.
What would be the correct way to reply to his/her comment? I can simply add a comment of my own to the page. But is this the right way? Will he/she be 'notified' (if this even exists in Github)?
|
How can I reply to someone's comment on a pull request on Github?
|
4
So I just ran into this as well. Going off of @juanriqgon's comment, you could add contributors (in order of who contributed the most - maybe adding a note to the package for that).
{
"contributors" : [
{
"name" : "Barney Rubble",
"email" : "[email protected]",
"url" : "http://barnyrubble.tumblr.com/"
},
{
"name" : "Newton Bubble",
"email" : "[email protected]",
"url" : "http://newtonbubble.tumblr.com/"
}
]
}
source: https://docs.npmjs.com/cli/v7/configuring-npm/package-json#people-fields-author-contributors
hope this helps the community!
Share
Improve this answer
Follow
answered Oct 9, 2021 at 15:16
NissalNissal
11577 bronze badges
Add a comment
|
|
I forked someone's repo and added functionality. The amount I contributed is just under half of all the functionality it now has.
In the fork in package.json, his name is still in the author field.
Should I change the author field to myself and add him as a contributor to the contributors field? Or should I leave the author field AS-IS and add me as a contributor?
|
Should I change author in package.json after forking and improving a Github repo?
|
You collaborate by swapping commits around among repositories and cooperating to whatever extent you find convenient on what to name interesting ones. That's it. Really: that's all there is to it.
Github runs a server that speaks most of the main protocols git supports for swapping commits and refnames around, and it has a web GUI on top of a big helping of handy abstractions and features for browser-mediated access, but when it comes right down to it it's all about swapping commits. There's lots and lots of ways to do that, because the underlying structure is (quite literally incredibly) simple. It's so simple people don't believe it.
Your repos are yours; what goes on in them is your business alone. The idea is getting commits into another repository is in some agreed-on (for each repo) sense publishing them. What's in at least some (including your own) repos will include rough-draft commits and random notes, experiments and outright garbage that nobody wants. Nobody cares what's in your personal repos any more than they care what's in the notes on your desk, it's the ones you publish that matters.
Using multiple repos for a single-project workflow is common -- creating a sandbox clone for really experimental work quite literally doesn't take two seconds for even the largest repositories (any subsequent checkout might take some time). You start doing clones to a tmpfs with barely a thought.
And in every repo you have the full power of a world-class vcs available for your own exclusive and personal use.
|
I am a beginner to Git and Github and still confused about them. It is said that we can use Git without Github when collaborating with other people. However, it is also said that Git works locally on one's computer. If we do not use Github, how can we collaborate while Git works only locally?
|
How to collaborate in a project using Git without using Github?
|
4
You have to think in your developments as separated features that aren't related.
Your second feature should use a new branch/fork which should be created from the original/currentVersion project, like the first time.
Share
Improve this answer
Follow
answered May 28, 2015 at 11:44
mayomayo
3,96511 gold badge3333 silver badges4545 bronze badges
4
2
What if the first pull request had a mistake. Do I have to make a new branch simply because I had a bad or mistaken pull request?
– Goose
Mar 2, 2016 at 19:39
2
If the first pr was merged to the original/currentVersion branch, I suggest you make another branch (is like any other bug and fix flow). If not, you can work on the same branch (the first pullRequest branch), commit the fix and the pr will be updated with your changes.
– mayo
Mar 2, 2016 at 21:13
1
What? Create a whole new branch just because I added two comments into example configs — are you serious?
– Hi-Angel
Sep 1, 2016 at 15:25
haha, good point! well, I guess that it's a good example to apply the "common sense" rule! I would say that if you are not modifying logic you should skip the pull request.
– mayo
Jun 28, 2018 at 18:44
Add a comment
|
|
I've used other revision control systems before but have little experience with git and github.
I wanted to contribute to a project, so I forked it on github, fetched a local copy of my fork, edited it, committed it, pushed the change back to my github fork, and opened a pull request for the original upstream author to look at. That all seems fine. The author said he'll get around to using it in a bit.
But now I want to address a second issue of the project with a second pull request. But everything I commit and push ends up being appended to that first pull request. What I want to do is make a new second pull request for the subsequent changes, while the first pull request is still pending and not merged in to the upstream yet.
What steps do I need to run to do that? I'm using git-bash.
|
How to make a second github pull request when one is already pending
|
3
You should do as follow:
git log --oneline -S <COMMIT_SEARCH_PATTERN>
# Copy the commit hash
git rebase - i <COMMIT_HASH>~1
# Change the marker to **drop**
# Exit from the editor
git rebase --continue
git push --force
Share
Improve this answer
Follow
answered Sep 3, 2021 at 13:18
Antonio PetriccaAntonio Petricca
9,77855 gold badges3939 silver badges7777 bronze badges
Add a comment
|
|
On a commit I accidentally included a password. How do I remove this commit from the repository?
The push went to github so It's important that the commit be removed completely from the history.
|
GIT: accidental inclusion of password..how do I fix it?
|
Another option is to use GitHub Script. This creates a lightweight tag called <tagname> (replace this with the name of your tag):
- name: Create tag
uses: actions/github-script@v5
with:
script: |
github.rest.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: 'refs/tags/<tagname>',
sha: context.sha
})
|
Currently on my GitHub repository, I have the following workflow that releases a nightly snapshot every day, and uses the current date as release name and tag name:
name: Nightly Snapshot
on:
schedule:
- cron: "59 23 * * *"
jobs:
build:
name: Release
runs-on: ubuntu-latest
steps:
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
- name: Checkout branch "master"
uses: actions/checkout@v2
with:
ref: 'master'
- name: Release snapshot
id: release-snapshot
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.date.outputs.date }}
release_name: ${{ steps.date.outputs.date }}
draft: false
prerelease: false
GitHub labels all snapshots created this way as the latest release. However, I want to avoid this, and achieve something akin to what Swift's snapshots are like: the snapshots are only tags; although they appear among the releases, they're treated differently.
How should I modify my workflow file to make this happen? Thanks!
|
Use GitHub Actions to create a tag but not a release
|
Looks like there is a network problem because the git protocol, by default, uses the port 9418. Looks like your traffic is blocked on that port.
|
When I try to clone a project from the GitHub, it gives me the following error.
:git clone git://github.com/project.git
github.com[0: 207.97.227.239]: errno=Connection refused
fatal: unable to connect a socket (Connection refused)
But if I use the corresponding HTTP URL, it's fine:
:git clone http://github.com/project.git
What should I to do to clone through a git URL?
|
Why do I get "unable to connect a socket" when I try to clone via a git URL?
|
you need to base64 the logo
you can use http://b64.io/ to convert your png to base64 code
the link need to be entity escaped
your image was too large for the uri, you can scale it to 14px of height.
|
How do I use the logo option in shields.io badges?
For example, something like this
[](https://www.raspberrypi.org)
renders as this
which doesn't give the expected result.
|
How do I use the 'logo' option in shields.io badges?
|
This is what Deploy Keys are for.
That help article explains what deployment authentication methods GitHub supports and gives some pointers to help decide between them.
In my limited experience, deployment SSH keys are probably the simplest to set up.
|
Is there a way to generate a certificate or such so that my prod server can pull from my github repo without me authenticating every single time?
|
Pull from github without authentication every time
|
51
Use --force :
git reset --hard commitID
git push origin branchName --force
I am assuming origin is the remote of bitbucket
Share
Improve this answer
Follow
answered May 25, 2016 at 10:14
khrmkhrm
5,51311 gold badge2222 silver badges2626 bronze badges
8
Tried "git reset --hard 965a793" then "git push origin master --force". Still Bitbucket appears unchanged. My contents of git branch -a are "master" and "remotes/origin/master"
– me9867
May 25, 2016 at 10:24
@merch89 Reconfirm again. I check it in bitbucket now, it works for me. When you do git log, does it show anything else apart from 965a793 commit. Before you do git push origin master --force Confirm that
– khrm
May 25, 2016 at 10:32
This post here seems to sort it stackoverflow.com/questions/4114095/… git reset 56e05fced, git reset --soft HEAD@{1}, git commit -m "Revert to 56e05fced" , git reset --hard
– me9867
May 25, 2016 at 10:42
@merch89 It won't be change in bitbucket. You need to use --force while pushing.
– khrm
May 25, 2016 at 10:47
1
If you are pushing something in bitbucket and it conflicts, bitbucket won't allow.
– khrm
May 25, 2016 at 11:19
|
Show 3 more comments
|
I have git setup on my web hosting and on an account at Bitbucket which are both linked.
How can I revert back to my first commit on both my hosting (which I am logged into via SSH and has git installed ready and working) and on Bitbucket?
I have tried: git checkout 965a793
Then I tried with a dot on the end: git checkout .
but nothing seems to change on the Bitbucket side, when I got to git push. It says everything is up to date, even though Bitbucket is on commit cf08232
Here is a list of my three commits:
cf08232 remove the txt file
096d08f test.txt edited online with Bitbucket
965a793 Initial Commit
|
Revert to an old commit in Bitbucket
|
Now it is working! I didn't even change a thing.
This kind of an error ' result=52 ' is an error with github itself. Github.com was going down and when I tried uploading I got the error. Now the site is back up and I can commit like normal.
|
I created a new repository on github and wanted to push some files. So I initialize the repository like normal and do git add . to add the current directory (which is my java project folder with bin and src folder inside). Then I added the remote directory using:
git remote add https://github.com/username/project.git
Then I made my first commit git commit -m "First Commit"
then I type git push -u origin master and I get this error:
Counting objects: 63, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (60/60), done.
Writing objects: 100% (62/62), 16.98 KiB, done.
Total 62 (delta 15), reused 0 (delta 0)
error: RPC failed; result=52, HTTP code = 0
fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly
Everything up-to-date
But if I add just one file and try to commit just a single file, it works.
What is going on? Why can I not commit my whole Java project? Its a pretty small project only 214k. Please help! Thanks!
|
Why do I get error: RPC failed; result=52, HTTP code = 0 fatal: The remote end hung up unexpectedly when pushing to github?
|
You say "I believe my context is different", but don't give any reasons why it is. As such, I can't offer you any specific suggestions other than the generic pros and cons, which are outlined in various documents and tutorials online.
My suggestion: pick a program first (git, Mercurial, or SVN) and use it. Find a hosting site that supports the software (at the time of this answer, GitHub for git, BitBucket or Google Code for Mercurial, Google Code for SVN) and use it. If you run into problems, switch to another one.
I've used all three, and typically the problem isn't the hosting, but the fact that you need to learn the program itself. All of the hosting providers listed here will suit you fine until you have a specific reason why it doesn't.
|
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
Note: I have seen this and tried to take as much from it as possible; but I believe my context is different.
I am working on a small-ish project. Call it Foobar. I'm wanting to get this done more organised..I've tried a few projects, mostly as an unorganised programming-as-a-light-hobby student. I'm trying to get more organised; 90% of those projects went after I either failed to document at all, or because I lost them.
As such, I've been thinking about getting version control/hosting going. Not only will it organise me more, but (a big if here) if it gets anywhere into a usable state, it will be easier for people to get.
The two places I'm considering are Google Code and GitHub. From the question I linked:
Google Code:
As with any Google page, the complexity is almost non-existent
Everyone (or almost everyone) has a Google account, which is nice if
people want to report problems using the issues system
GitHub:
May (or may not) be a little more complex (not a problem for me though) than Google's pages but...
...has a much prettier interface than Google's service
It needs people to be registered on GitHub to post about issues
I like the fact that with Git, you have your own revisions locally
From this I'm leaning towards GitHub, as Google Code doesn't look appealing to me.
For a small hobby project - basically making community features irrelevant - are there features that should take me over to one side or the other?
|
GitHub vs Google Code for a hobby project [closed]
|
Just reload your terminal by closing then opening back. Should work after that.
|
This happens when I run this:
git push origin reactUI
What is happening? Was working fine yesterday.
No user exists for uid 502
|
No user exists for uid 502
|
The markdown syntax for an image with link is
[](link url)
So, try:
[](https://sonarcloud.io/dashboard?id=com.lapots.breed.judge:judge-rule-engine)
|
I am trying to add SonarCloud badge to my README.
But when I do like this

The badge itself looks fine but it does not allow to go to sonarcloud project and instead leads to camo.githubusercontent.com.
Which link should I use to access the SonarCloud project?
Thanks.
|
How to add SonarCloud badge on GitHub?
|
I noticed that I had the same problem after installing Github Desktop for a few days. I uninstalled it because I was just testing it anyway and found my git in my system by the following code:
which git
That command showed me the following output:
/usr/bin/git
So I entered this into 'Path to Git executable' in the Preferences > Version Control > Git. And restarted the IDE. Everything works now...
|
Hi i am trying to link up my a java group project from github to intellij. However i keep getting this issue with Git, i download it but then i try again and it asks me to download it again?
I've looked up the 'Paths to Git executable' and this is what it shows
But i really don't understand why this is not working. I am new to github and would really appreciate some help on this!
|
'Git is not installed' on intellij
|
My guess is that you are trying to add folder while you already are in folder.
$ cd my_folder
$ git init
$ git add my_folder # this is not going to work
Instead, add everything in the folder, rather than the folder itself:
$ cd my_folder
$ git init
$ git add .
To your other question, adding whole folders is fine, but only relevant when adding sub-folders. Again, you can't git add the folder that is your repository (my_folder above).
$ cd my_folder
$ ls
my_subfolder other_things
$ git add my_subfolder # this is fine
The usual way to add everything in your working tree to your repo is git add ..
|
I'm new to git and I am trying to git add my whole working directory but I receive the error message:
fatal: pathspec 'folder' did not match any files.
I'm in the working dir when I do this command, what am I doing wrong?
Also, is it good practice to commit the whole folder instead of file by file?
Thank you
|
How to git add a whole folder
|
Have you tried git push origin my_new_branch?
|
I created 2 new branches using the command line, and when I use the command 'git branch' I can see all of my branches in the window, but when I used the command 'git push' I get a message that says, "nothing to commit, working directory clean' and so I'm not seeing my new branches on github.com.
Can anyone shed some light?
Thanks!
Robin
|
Github Windows: New branch created from command line not showing up on github.com
|
Github supports cloning using both the git protocol over port 9418 and HTTP over port 80. Using the later is very slow (Reference).
You should open port 9418 on your firewall or use HTTP cloning otherwise.
|
I'm a little hesitant to post this, as I'm not completely sure what I'm doing. Any help would be wonderful.
I'm on a computer with a firewall/filter on it. I can download files without any difficulty. When I try to clone files from Github, though, the computer just hangs. Nothing happens. It creates a git file in the folder, but the key files don't get loaded in. For context, I'm working on a Rails app, trying to load in Restful Authentication.
Have any of you dealt with this? Any suggestions for getting the clone to work? Disabling the firewall might be an option, but if I can do something without going through that process, I'd appreciate it.
|
Trying to load files from github through a firewall is impossibly slow. Any suggestions for workarounds?
|
27
I recently experienced this problem when setting up a new clone of my github project.
You need to include your username in the URL to your project, in the form
https://[email protected]/project/...
For example, the URL provided for my test github is this:
https://github.com/jdblair/test.git
If I add my username to it, like this, then I'm able to push and pull from github with no problem:
https://[email protected]/jdblair/test.git
It is easiest to use the URL that contains the username starting from when you clone a project.
You can change the URL for an existing project like this:
git remote set-url origin https://[email protected]/project/foo/bar.git
You can use the ssh authentication instead if you want, but that's a separate setup process.
Share
Improve this answer
Follow
edited Feb 25, 2013 at 14:23
hadsed
32722 gold badges44 silver badges1111 bronze badges
answered Nov 13, 2012 at 15:03
jdbjdb
54955 silver badges66 bronze badges
1
This solved the issue for me (I have git 1.7.1 and can't easily upgrade since it's on a server not managed by me)
– Davide
Apr 29, 2013 at 22:54
Add a comment
|
|
I have created a repository on github named pygame. Created a clone and added files and commited.but when I attempt to push I receive the following error:
git push -u origin master
error: The requested URL returned error: 403 while accessing https://github.com/amalapk/pygame/info/refs
fatal: HTTP request failed
I can ssh to [email protected] and receive the notice that I logged in successfully, but can't push to my repository.
|
problem in pushing to github
|
To go the first commit of the repo, do
git checkout master
git log --reverse
The first entry in the output is the first commit.
you can switch to that commit by git checkout <SHA-1>, where is the SHA of the commit(first one)
Also, when you do git log you can easily navigate to the last entry to see the first commit.
All this can also be done in single command like git checkout `git rev-list --max-parents=0 HEAD | tail -n 1` which means to switch to the last commit having no parent from the current HEAD
Note: if you used --depth option, you might not be able to see the actual first commit, to avoid this ensure you clone the full repo (without --depth option)
|
This question already has answers here:
How to reference the initial commit?
(6 answers)
Closed 6 years ago.
How can I jump to the first every commit in a git repository? Also, is there a way to do it on Github through the website?
|
How do you jump to the first commit in git? [duplicate]
|
For public repo, you have this gist listing some examples:
wget --no-check-certificate https://github.com/sebastianbergmann/phpunit/tarball/3.5.5 -O ~/tmp/cake_phpunit/phpunit.tgz
For a private repo, try passing your credential information in a post directive:
wget --quiet --post-data="login=${login}&token=${token}" --no-check-certificate https://github.com/$ACCOUNT/$PRIVATE_REPO/tarball/0.2.0.257m
Or use a curl command as in SO question "git equivalent to svn export or github workaround", also explained in great details in:
"A curl tutorial using GitHub's API".
The OP Steven Jp reports having made the curl command work:
The final curl command ended up looking something like this:
curl -sL --user "${username}:${password}" https://github.com/$account/$repo/tarball/$tag_name > tarball.tar
(in multiple lines for readability)
curl -sL --user "${username}:${password}"
https://github.com/$account/$repo/tarball/$tag_name
> tarball.tar
|
I need the ability to download our application at specific tags, but I am unable to find a working solution for this. Downloading tarballs based on git tag seems promising but I am unable to get it working using Curl. I have tried the following but all I get back is the source for the github 404 page.
curl -sL https://github.com/$ACCOUNT/$PRIVATE_REPO/tarball/0.2.0.257m?login=$MY_USER_NAME&token=$MY_TOKEN > 0.2.0.257m.tar
|
Having trouble downloading Git archive tarballs from Private Repo
|
On Git, branches are just pointers to a commit. The branches are stores as plain files on your .git repository.
For instance you may have abc and def files on .git/refs/heads.
$ tree .git/refs/heads/
.git/refs/heads/
├── abc
├── def
└── master
The content of these files is just the commit number on which the branch is pointing.
I am not sure, but I think the option ignorecase is only relevant to your working directory, not the .git folder. So to remove the weird capitalized branches, you may just need to remove/rename the files in .git/refs/heads.
In addition to this, the upstream link from a local branch to a remote branch is stored on the .git/config file. In this file you may have something like:
[branch "Abc"]
remote = origin
merge = refs/heads/abc
Notice in this example that the remote branch is named abc0 but the local branch is abc1 (lowercase).
To solve your issue I would try to:
Modify the abc2 file
Rename the corrupted branches in abc3 such as abc4 is renamed abc5
Try your abc6
|
I seem to be having an issue with a repository continually recreating branches locally because of some branches on remote. I'm on a Windows machine, so I suspect that it's a case sensitivity issue.
Here's an example couple commands:
$ git pull
From https://github.com/{my-repo}
* [new branch] Abc -> origin/Abc
* [new branch] Def -> origin/Def
Already up to date.
$ git pull -p
From https://github.com/{my-repo}
- [deleted] (none) -> origin/abc
- [deleted] (none) -> origin/def
* [new branch] Abc -> origin/Abc
* [new branch] Def -> origin/Def
Already up to date.
When doing a git pull, the branches in question are capitalized. When I do a git pull -p (for pruning), it first tries to delete lowercased versions of the branches, then create capitalized versions.
The remote branches are capitalized (origin/Abc and origin/Def).
I have tried to temporarily change my Git config such that ignorecase=false (it is currently ignorecase=true). But I noticed no change in behavior. I'm guessing there's something local on my end that's currently holding onto those lowercased branches. But git branch does not show any version of these branches locally.
Short of completely obliterating the repository (a fresh git clone in a separate folder does not pull these phantom branches when trying pulls/fetches), is there anything I can do?
|
GitHub Branches: Case-Sensitivity Issue?
|
Perhaps try:
git push [email protected]:{username}/{projectname}.git HEAD:test
The format of the last parameter on that command line is a refspec which is a source ref followed by a colon and then the destination ref. You can also use your local branch name (my_test) instead of HEAD to be certain you're pushing the correct branch.
The documentation for git push has more detail on this parameter.
|
I have a public repository at github.com with 2 branches : master and test.
I created a new directory locally and did:
[ ] git clone [email protected]:{username}/{projectname}.git
Then I created a new branch named my_test with
[ ] git branch my_test
and switched to it.
[ ] git checkout my_test
Then I merged it from my test branch of my public repository with
[ ] git merge origin/test
and it resulted in a fast forward.
I made some changes and committed them.
Then I tried to push the local my_test branch to the public test branch at github with
test0
but I got this error:
test1
What am I doing wrong ?
|
Error when "git push" to github
|
You don't need to "clone onto GitHub". You just have to create a repository on GitHub and push your changes there:
$ cd your_local_repo
$ git remote add origin [email protected]:USERNAME/REPO_NAME.git
$ git push origin master
|
I have been using git locally for while a now and have a private repository with complete change history etc. I now want to share this on GitHub, so I need to clone from my local repo into a new GitHub repo. I cannot find any way to do this. How can I get all my history up onto GitHub?
|
Clone repository into GitHub
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.