Would someone please let me know if there is any way to create link to JIRA tickets in my github commit messages?
You can try and follow "Connect Jira Cloud to GitHub", which allows for GitHub or GitHub Enterprise account to be linked to Jira Software.
Your team gets to see their branches, commit messages and pull requests right in the context of the Jira Software issues they're working on
When a developer makes a commit, they should add a Jira Software issue key to the commit message, like this:
git commit -m "PROJ-123 add a README file to the project."
git push origin <branchname>
Update Oct. 2019, you now can set up an autolink reference and GitHub will automatically create links (to external systems) for you.
See "make Jira links clickable in GitHub" (only for GitHub Pro, Team, and Enterprise plans).
Related
I have been using my university private gitlab for a while. I have a lot of commit that can be shown like this Gitlab commit
I cannot give the link to my gitlab to potential recruiter. So I decided to create a github and put my repositories there.
On my github I create a new repo and locally I just do:
git remote add origin2 git#github.com:mylogin/new_repo.git
git branch -M main
git push origin2 -u main
I can see the commit inside the repo, but on my github heat map it is showing as one big commit. I want it to show all my previous commit inside my github.
I don't know if it possible.
Please help.
I think maybe you see on Github is not commit, it is a event that you join Github.
Just like:
Accroding to docs:
Commits must be made with an email address that is connected to your account on GitHub.com, or the GitHub-provided noreply email address provided to you in your email settings, in order to appear on your contributions graph.
So, you can add email address which you commit on Gitlab to your Github account. After this, the contributions will be counted and shown.
Follow this guide to set up your commit email address on Github:
https://docs.github.com/en/account-and-profile/setting-up-and-managing-your-github-user-account/managing-email-preferences/setting-your-commit-email-address#setting-your-commit-email-address-on-github
I have a private GitHub repo that has been rebased a few times and a Jira ticket that is tracking. GitHub and Jira are linked so the commits are tagged to the Jira ticket.
The issue is that previous rebased commits still show on the Jira ticket. The GitHub history is correct? I’m assuming these are cached somewhere In Jira rather than looking through the reflog? I’ve tried a full sync for the Jura’s GitHub App but the rebased commits still show. Is there a way to remove the links?
As my browser was crashing I was not able to create a pull request from GitHub UI, I was trying to create a pull request from git console but didn't found any way to create a pull request.
I have also searched for the same over the net but most of the tutorials suggested to create a pull request from UIs only. I just want to be able to handle the pull request like creation, rejection, approved and merging without the browser. Please suggest.
git and github are separate products. github is a service that happens to use git, but it is not part of git, its UI is not a git interface, and git does not have any special support for github functionality.
There is a little potential confusion here, because there are "pull requests" - an integrated feature of github having to do with branch workflow - and there is git request-pull, a seemingly lesser-known feature of git which creates a text message you could send to another repository maintainer to request that they pull changes from your repository.
Naming confusion aside, the "pull request" you want is a feature of github, not git; and so git itself (including git console and any git UI tool) have no command for this. You have to use a github-supplied interface, and AFAIK that means the web UI.
To open a pull request from the command line, you can install the hub set of command-line tools that GitHub supports. This will allow you to create a pull request from a repository with:
hub pull-request
I'm not aware of any similar tools for managing pull requests, though.
git add -p
then
git commit -m "message"
then
git push origin "your_branch"
the pull request will be created in github
Based on this tutorial I was able to successfully connect Github for Desktop with my remote Bitbucket repo.
Looking at the example tutorial repo I see there is an Pull Request option built in the application - great:
However the option is missing when I chose my remote Bitbucket repo:
I couldn't find any option that is reponsible for this.
Anyone knows what affects this behavior?
"Pull Request" is very much a GitHub feature, associated to GitHub repos.
So For BitBucket, the simplest approach is to push your feature branch to the remote repo (which is a BitBucket one, not a GitHub one), and make your PR from there (from the remote BitBucket web GUI, even within the same repo)
Once the PR is initiated, each push done from the GitHub Desktop will complete said PR.
In Bitbucket go to Settings -> Branch Permissions, and add a new branch permission with your name.
EDIT
https://stackoverflow.com/a/37343356/1544886
We have a few repositories and forks on a trial version of Github Enterprise. I want to evaluate how to migrate from Github enterprise to Github.com (into a paid for organization, say)
The only resource I found was how to perform the migration in the opposite direction
https://help.github.com/enterprise/2.0/admin/articles/moving-a-repository-from-github-com-to-github-enterprise/
I have contacted github.com asking the same questions as below and I am waiting for their response.
How do we migrate a repository from github Enterprise to github.com? (fairly certain that a git clone --bare and a git push --mirror will do the job)
If I migrate forks as well, how do we make sure that the relationship between the original and forks is maintained?
How do I migrate the webhooks and services we configured for our repositories?
How do I transfer the Pull requests/Issues? (article I linked to above says we need to use the Github API, I am OK with this solution)
Can we migrate teams and users? (guessing, probably not)
Note that we have the backups of the enterprise instance performed using the backup tools provided by github (I think it is called ghe-backup)
Thanks
You should be able to use the steps in the linked document in the reverse order as well:
Create an empty repository at github.com
Create a clone of the enterprise repository on your local.
Add github.com as a remote reference on your local clone.
Push all references to the github.com repository.
http://www.alexhadik.com/blog/2016/5/26/migrating-github-repositories-with-gitmover appears to offer a solution: GitMover is "a simple Python script that takes Git repos on any type of GitHub installation, and copies issues, labels and milestones from one to the other. It's the perfect tool to help automate the open-sourcing of an internal project."