Renaming a base branch in github - github

I am trying to correct a typo i.e. spelling mistake in the name of of github fork I have created. Drop a "t" from gwt-hightchart-dashboard-demo to gwt-highchart-dashboard-demo
I am not able to find out how to do this simple exercise after going through a few google/stackoverflow search.
Is this possible?
Is this possible via GitHub web GUI? How?
Is this possible via GitHub Windows GUI? How?
Is this possible via Git command prompt? How?
Reference the image below.

I don't think its possible to do this via the GUI yet but you can do this locally and push changes:
git branch -m gwt-hightchart-dashboard-demo gwt-highchart-dashboard-demo
You can just use the built in branch renaming facility to do this
git branch -m old_name new_name

Go to your repos Settings >> Options and look for "Default Branch" selection box. It will have a list of all your branches. Changing this will edit your base branch.

Related

How to delete a file from GitHub history without using commandline

I need to remove a file from history. I don't have commandline access to GitHub. Kindly help if this can done through UI itself.
You can't delete the file from history, but you can delete it from the repository by following this help article
Alternatively, you could do a cherry-picking using one of the Git GUIs software, then cherry-pick all the commits, except for the one that you wanted to removed, into a new branch. Then, delete the old branch.
TO achieve this, you have to have command line access.
Delete file from history
But Using UI , you could delete the file from the repo (branch)
Ex:
Click the delete button on top right corner and commit.
You don't need command line access to GitHub, only to your own local clone, where you can:
either do a git filter-branch (example here)
or use BFG
Then you git push --force.
But the alternative, if you really don't want to use any command line, even locally... would be to contact GitHub support, asking them to remove the file from your remote repo history.
That is a last resort option though, since you are supposed to be able to do that on your own.

In SourceTree is it possible to use both GitHub and Bitbucket with one instance?

SourceTree appears to be a decent GUI frontend to both Git and Hg and I'd like to use it as my client for both Bitbucket and Github.
However, on initial setup it offers only to add one of them and later on in the settings one can only edit the existing entries but not add new ones.
Is there a way to use SourceTree against both Github and Bitbucket at the same time?
I am using SourceTree 1.6.12.0.
Yes I use for both. I think I used github first. Then later I added a new repo, selected clone from url and gave it a bitbucket url. Works fine.

Discard all changes in Github Desktop (Mac)

How to discard all changes in Github desktop (mac), comparing to the latest commit?
It is possible to click on one file and select "discard changes". But how to discard all changes in files?
Just in case anyone is interested, it can be done via GitHub's Menu Bar: Repository/Discard changes to selected files.
Right click on any file and you'll find the option to 'Discard All Changes':
If anyone would be interested to do this without Github Desktop, since I got to this page by searching;
"How discard all changes work in Github Desktop?"
Just run the command below in your project folder from terminal:
git reset --hard
Use
git checkout .
to revert local changes and add a
git pull
to fetch the latest code from remote

How to integrate LazyBones with VCS?

I just learned about LazyBones and absolutely love it! The problem is that it generates a "code skeleton" for you before your app's VCS repo exists. And I see there is some integration capability with Git, but what about other VCSes?
Specifically, I'm using Mercurial. So ordinarily, I'd create the hg repo for my new app (on the server), clone it out locally, and some code to the cloned working copy, commit & push it.
So I ask: what is the proper workflow (or set of commands) to create a new app from a LazyBones template and integrate it with a new hg repo?
I suppose, slightly more elegant way may be:
Generate skeleton by LazyBones in SomeDir
Init Mercurial repo after it in SomeDir
Add needed files from working directory into (empty) repository
Create remote repo on server
Add remote repository URL into [path] section of local repo's .hgrc (maybe also auth. credential into [auth])
Push

Change the branch name on github that references HEAD

In my remote bare repository the HEAD is pointing to "refs/heads/master" and I want it to point to "refs/heads/other".
I am not able to go to remote repository directory and run git symbolic-ref. Is there any git command to achieve it? Or any other way?
If there is no way, does Github allow one to change the HEAD?
To change it in github, go to the admin section.
You can select the default branch from a dropdown there.
(There has been posted another question asking basically the same: How do I change a Git remote HEAD to point to something besides “master”, and there was more discussion there, with a reference to the Github group. So I'd just like to point anyone to that discussion as well.)
As we know, there is no universal answer.
But there are a specific answers for various git "farms" (where multiple users can manage git repos through a restricted interface: via http and ssh): http://Github.com, http://Gitorious.org, http://repo.or.cz, Girar (http://git.altlinux.org).
These specific answers might be useful for those reading this page and thinking about these specific services.
Now they have a drop-down menu for selecting the HEAD branch at http://repo.or.cz (example: http://repo.or.cz/editproj.cgi?name=for-me-and-for-all_imz.git);
and at http://gitorious.org, too (look somewhere in the settings);
and at http://GitHub.com: admin > Default Branch > (choose something) (thanks to #srcspider's answer);
and in Girar (running on http://git.altlinux.org to build packages for ALT's distro), one can the ssh interface for this:
$ ssh git.alt help | fgrep branch
default-branch []
$
for example ssh git.alt default-branch packages/autosshd.git sisyphus to change the HEAD in the remote repo autosshd.git to point to the sisyphus branch.