Questions tagged [github]

16789 questions
1

votes
2

answer
378

Views

Show a contributor's number of commits and lines of code contributed

I would like to view a summary of my total number of commits and total number of lines of code which I have committed to a particular repository on GitHub. Is there any way to do this using either: GitHub, Git Shell on Windows, or another tool which easily works on Windows or in a web browser? Here...
Patrick Parker
1

votes
2

answer
203

Views

Is there a way to specify a default option for merging a pull request in GitHub?

I'm working on a project where 'squash and merge' is the preferred approach for merging pull requests. Is there a way to make this the default option in GitHub, either for my own user, or for the project? As it stands, it's entirely too easy to select the default option (Create a merge commit). Th...
M. Justin
1

votes
3

answer
133

Views

How are different branches stored locally from git on my disk?

I have only one version repository sitting on my local HDD but multiple branches on Github. Shouldn't there be copies of code per branch? what version of code do I have sitting on my local disk?
Sarun Luitel
1

votes
2

answer
364

Views

How to make GitHub Pages Markdown support mermaid diagram?

I am hoping to use mermaid in GitHub-pages, with simple commit and push. In other words, I am hoping to wirte in my markdown file like this ```mermaid graph LR A --> B A -->C C -->D ``` and add some js on my _layouts/post.html to somehow transform this to a mermaid graph. I have found this theme c...
water liu
1

votes
5

answer
82

Views

How to pull a pull request from upstream in github

I have forked a repo in github. There are some new pull requests in the Upstream. I want to pull a pull request from upstream locally. How can I do that? I have no idea and found nothing related to this.
Noor A Shuvo
0

votes
0

answer
8

Views

How to fix “Sorry, something went wrong. Reload?” in GitHub?

I'm uploading Python Code in GitHub. But sometime the message shows that it say Sorry, something went wrong. Reload?. Is there any way to fix/erase when uploaded ipynb file?? Thanks ipynb file error Or Just Tell me why it cause..don't know why it haapens..
Minsuk Sung
1

votes
2

answer
22

Views

Git branching strategy issue

Currently we are using a GitFlow approach to our branching strategy. However we came across the following scenario. We created a release branch. There were a couple of bugs that needed a fix on the release branch. In the meantime since the development continued on the develop branch there were addit...
igalbenardete
1

votes
2

answer
21

Views

How can I create a pull request from a fork without having created a branch on the fork?

I created a fork on Github, worked on the fork and now I want to create pull request for the original project to take my changes. All the documentation I can find here, GitHub and Google refers to a branch being selected for the pull request, but I did not create one. How can I proceed?
rob
1

votes
1

answer
86

Views

how to fix 'AssertionError: expected false to be truthy' error?

I am beginner on E2E Tests and I want to make a e2e signup to a github account test with TestCafe, but I get this error when runing test: ExternalAssertionLibraryError { code: 'E53', isTestCafeError: true, callsite: CallsiteRecord { filename: 'TestCafe\\authentication.page.js', lineNum: 152, callsit...
hanae
1

votes
1

answer
30

Views

Git clone doesn't download all the files due to windows limit on length of file path

I am trying to clone a Git repo on windows 7. But git is not cloning all the files. I have checked the repo and there are no submodules so adding --recursive flag is also not helpful. IMO the reason for above mentioned behavior is windows limit on file path upto 255 characters. Is there a way to res...
Yug Singh
1

votes
1

answer
44

Views

Github pull request shows wrong diff

I am having two branches: - master and - develop. I am trying to merge branch develop into master branch. I have checked with Tower and Araxis merge, those two branches are identical. But when I do a pull request on Github, I am seeing that there are 381 files changed, like files are not on master a...
be-codified
1

votes
3

answer
197

Views

git stash to save current changed file

I made a couple of changes in branch A. For some reason I have to stop developing this feature in branch A. I have another task for which I need to create a new branch. I know that by doing git stash and pop, I can save the current changes and restore it later while I can do whatever I want in the n...
Mellisa Lee
1

votes
1

answer
32

Views

How to push downloaded ZIP project from bitbucket to Github?

I've downloaded a project that was on BitBucket as a ZIP. I've extracted it and now I want to push that project onto a new repository in GitHub with all its content (including commit history and so on). How can I achieve this?
Stackoverflowed
1

votes
2

answer
28

Views

Move directory to a new repo in github

Current repo looks like this... /ab/docter /ab/pepper /cd/.. ... I want to keep the whole history in ab and move it to a new Repo in GitHub. /doctor /pepper I tried to pull and manually move it to ab repo but the history doesn't come with the push. :(
John Baek
0

votes
0

answer
7

Views

Git Selective merge

I have a master branch 'A' and a feature branch 'B'. Now a file called 'X' has evolved with some changes in both 'A' and 'B' branches. How do I create a third branch 'C' ( From Master 'A') where I can get the file 'X', having both the changes from branch 'A' and branch 'B'. And also I don't need...
athavan kanapuli
0

votes
0

answer
15

Views

GitHub pull requests produces a merge commit and the branch's commits

I recently merged a pull request on GitHub with a merge commit, and it produced a merge commit as expected, but also added the commits from the branch, which we don't want. We were using the 'Squash and merge' option before which only added one commit when merging the PR (as desired), but this meant...
SamTebbs33
1

votes
0

answer
17

Views

GH Pages CSS file missing or SCSS not processed

I've copied most of my site so far from this example, the biggest exception being that I'm working in a /docs directory instead of in the root. In my default.html layout, I have: which spits out the expected html element pointing to the css file: https://example.com/css/style.css?v=2ddde426cabbbb39...
Randy Hall
3

votes
1

answer
143

Views

In GitHub,update one branch to match another branch

So here's the deal: For each of our 50+ repositories, we have a three-tiered branch model: Dev, Test, Master. Dev can be updated whenever the Devs want, and changes are aggregated by a team lead and submitted for deployment to our test environment, at which time the code is merged to the test branc...
MarkTO
0

votes
0

answer
5

Views

How to iterate through GitHub repository pages, page by page?

I have a question regarding the GitHub API. Basically what I want is to iterate through every repository/resource of a given owner and return the open feature requests. I managed to do that successfully with the code below: import requests import json class GitHub(): def __init__(self, owner, repo,...
Sebastian Manea
0

votes
0

answer
12

Views

Git Rebase or Squash?

I have created a feature branch from develop and that feature branch contains bunch of commits for approximately 20. Before merging the feature branch to the develop I want to convert all commits into one. Which one is the best way to accomplish this task git squash or rebase and how to do it?
saon
1

votes
2

answer
1.3k

Views

Git how to pull only some commits

I have some commits that i have made to my own forked repo from the master, now I would like to create a pull request for only some of my commits (some are reverted in my repo). I don't want to clutter up the pull request with my unnecessary commits, what should I do.
zehata
1

votes
3

answer
328

Views

Git Ignore files when make a pull

I am new at github and i am developing a app that have a config.php file that you must enter the database credentials. In my github repository the file is like this: But in the website i have the file with the credentials: In the .gitignore file i put the file that i dont want to push to my github r...
Roke
-1

votes
0

answer
16

Views

GitHub how to test someone else's branch without overriding yours

I just have a question in mind when I'm using GitHub. Say if person A who I'm working with made some changes to the master branch's file File B and want me to test it out before merging it. The problem is I edited some of the files too, and if I fetch his code it will override mine. How should I app...
FrozenToxic
1

votes
3

answer
1.3k

Views

How can I make WireMock port more dynamic to use it for testing service

I am using wiremock to mock github api to do some testing of my service. The service calls github api. For the tests I am setting endpoint property to github.api.endpoint=http://localhost:8087 This host and port are the same as wiremock server @AutoConfigureWireMock(port = 8087) so I can test diffe...
niemar
1

votes
2

answer
57

Views

Remove file from certain git commits while keeping the local version unchanged

The situation is as follows: we have a file A.out in our git repository that grew over time and now became too large to be pushed to github. I only realized the latter several commits after it became too large, so here is how the repo looks like: COMMIT5 (HEAD) contains A.out exceeding 100mb COMMIT4...
Christian
1

votes
1

answer
36

Views

Remote branch on Github won't allow deletion

I'm trying to delete a remote branch. It's 4 years old and I've never used it. I have followed the instructions I have found on SF and other sites, yet the command as given refuses to work. The result of git branch -r is: origin/dev origin/master origin/maxxo_rspec_reorg And so, the command as I hav...
AKWF
1

votes
2

answer
26

Views

Publish website without project name on github

I used Github Pages to upload web site: https://username.github.io/projectname How can I upload web site in root URL? So, it will be: https://username.github.io/ For example: https://webcommunityukie.github.io/
Kirill
1

votes
3

answer
39

Views

Problem with markdown formatting - how to display code correctly

I have a short README.md where I have problems in formatting. https://github.com/wojciehm/macOS-.bash_profile-cron-backup I can't paste the raw code because SO wants to format it as well.
wojcieh
1

votes
3

answer
42

Views

Reverting multiple commits and merges back to a specific commit without force pushing

The Problem: Remote Repository with ~50 commits that should be reverted back to 1 specific commit (like a git reset --hard 'my specific commit') commits AND merges in remote no force pushing at all I know I could do git revert -n 'my specific commit'..HEAD the problem with that is that it stops at t...
gempir
1

votes
1

answer
25

Views

How do I update my local Git origin vs. upstream settings?

I have been following this guide to migrate my BitBucket repos over to GitHub. Specifically, I'm creating the new GitHub repo, and then setting that as an upstream on my local Git config like this. git remote add upstream https://github.com:USER/PROJECT.git git push upstream master git push --tags u...
Drew Angell
1

votes
2

answer
17

Views

How to change a base branch of a closed / merged pull request?

I forked a repository, made some changes, committed them and sent a pull request. The PR was accepted and the changes were merged into the upstream repository. However, I later realized that I made a mistake of issuing a PR from my fork's master branch, instead of creating a separate branch to make...
ottowichterle
3

votes
1

answer
68

Views

Google Cloud Builder trigger giving “No such blob” error

I am setting up a Google Cloud Build trigger. I choose GitHub, authenticate to GitHub, choose the repository I want to use as a trigger, and then choose 'Cloud Build configuration file (yaml or json)' and leave 'Cloud Build configuration file location' set to the default of cloudbuild.yaml. However...
rlandster
1

votes
1

answer
242

Views

All the commit history from SVN is not migrated to GIT

I am a developer and for the first time , I am migrating my whole SVN repository to a GIT repository. As a POC, I have migrated current development branch. Migration was successful with the history as well. Problem : SVN commit history in GIT Result of migration : All the history of current dev bran...
Venkata
1

votes
1

answer
19

Views

Git: Update my remote git to be the same as my local

I'm relatively new on git, so keep that in mind. So, I have three branches: master b1 b2 This is how my local and remote repository look like. At one point, I merged b2 in to the master, and deleted b2 (all of this on my local repository). Lastly, I pushed my master to my origin/master. My questio...
Dimitris Pantelis
1

votes
2

answer
239

Views

Moving the Git Repository to a Child Folder

I'm using Github with my Wordpress website. Currently it tracks the parent Wordpress folder, which essentially tracks everything. I'd like it instead to have a git with only the theme, which is located at wp-content/themes/lighthouse Is there a simple way to have this repository only be the theme r...
James Mitchell
1

votes
0

answer
73

Views

github Oauth with Angular Error

getUserFromGithub() { const client_id = 'c****************c'; const redirect_url = 'http://localhost:4200/oauth2/github'; window.location.href = this.github_redirect_url + 'authorize?client_id='+ client_id+'&redirect_uri='+redirect_url+'&response_type=code&scope=*'; } Above angular method redirects...
Saurabh Verma
1

votes
2

answer
47

Views

PhpStorm Git file adding issue

Problem: 'Git > Add' doesn't seem to do anything, and 'Git > Commit File' says 'No changes detected', when git from the command line sees changes and can commit/push files. Details: I'm using PhpStorm 2017.3.2 (evaluating it) on OSX . I have a project that I've clone from GitHub. Git is configured....
Mehmet
1

votes
1

answer
38

Views

How to add inline CSS styles to an element for which the source of the CSS is a file (and not inline text) that you can't feasibly edit?

I have an html page (index.html) and css page (styles.css) with various elements (including a table) and styles: index.html: ... ... ...
Joshua Mitchell
1

votes
1

answer
64

Views

GitHub Get an email when someone follows me

Maybe I'm missing something super obvious, but I went into my notification settings and can't find anything about getting emails when people follow you. I can always go to my Followers tab on my profile to see who is currently following me, but I'd like to get updates. The only way I found out new p...
SleekPanther
1

votes
0

answer
77

Views

How to use PR on GitHub for Laravel Packages?

When I want to make a pull request for a Laravel package on GitHub I do it at the moment in the following way: Create new Laravel project Require & install the package Delete the add-on files from the project in the vendor folder Fork GitHub and clone files into the project folder Make changes to pa...
Adam

View additional questions