How to add license to an existing GitHub project - github

When I created a GitHub project I chose None.
How can I now add a GPL license to my already added project?

In your repository, click 'Create new file'
2.
a) Type 'LICENSE', 'LICENSE.md' or 'LICENSE.txt' as the new file's file name.
b) The 'Want to use a new template?' dialog will appear.
Choose your preferred license.
The accepted answer is almost there, but confused me, because it said 'click the blue plus' - the interface may have changed - and the image is the same as the OP's.

Go to your repository
Add a new file by clicking the blue plus icon
Type the file name as License.txt or License.md after which a license picker will show up. Then you can choose the type of license.

There is an easier way to get to the 'Add License' wizard:
Go to your repository's Insights tab
Click Community on the left side
On the right side, click Add on the line wich says License
For some reason this is not even mentioned in the docs at github.

Go to your repository
Click on "Create new file" Button
Type the file name as License.txt or License.md in the input box next to your repository name, a drop down button appears towards right side
Choose the type of license of your choice
Click "Commit new file" button at the bottom (Green button)

I just wanted to add another valid alternative using https://choosealicense.com made by Github and many more.
ChooseALicense.com aims to provide accurate, non-judgmental, and understandable information about popular open source licenses in order to help people make informed decisions about the projects they start, maintain, contribute to, and use.
After you have picked your license there are two alternative ways to transfer your new license.
Copy to clipboard: Click button Copy license text to clipboard and paste into your LICENSE file anywhere you want. How to add license into Github is answered by others.
Github: Fill textfield Enter GitHub repository url and hit Enter (Bellow the button). You will be asked for permission to access your Github repository.
Note!
Create a text file (typically named LICENSE or LICENSE.txt) in the root of your source code and copy the text of the license into the file. Replace [year] with the current year and [fullname] with the name (or names) of the copyright holders
Example

Related

Linking to a line of code in a particular version of a file in Azure DevOps (VSTS)

I want to link to a line of code in such a way that the link will continue to work even when the file is updated in future commits.
In Github I would do this by pressing 'y' to move to a version of the page that includes the blob SHA:
https://github.com/rails/rails/blob/b49e38b76b0998b0a8312d8c08c98728d3de2006/activerecord/lib/arel/attributes/attribute.rb#L30
(Alternatively GitHub has a 'copy permalink' option in the '...' menu that appears in the margin when you select a line - documented here.)
Is there an equivalent in Azure DevOps?
The link that I get when I select a line has the form:
https://.../_git/project?path=XXXX&version=GBmaster&line=426&lineStyle=plain&lineEnd=427&lineStartColumn=1&lineEndColumn=1
Lots of parameters defining the selection but nothing pinning the file version.
Edit:
The below illustrations can be summarized in a few keyboard shortcuts.
Open the repo Files view using the 'e' global shortcut
Use 't' to put focus on the path selection to quickly navigate to the file in question
point 2 and 3 are order agnostic in relation to one another
Use 'y' to change the Files view to be based on the latest commit instead of on the branch
Make selection
Copy link as shown in illustration below
Browse files on the commit
Make sure you're browsing the entire source for the commit. Selecting lines when viewing the commit itself (ie AzDOs fancy git show) is for adding comments to the commit, but it doesn't help produce a link to the line # that version, nor is there a way (at least not that I could find) to get a link to the comment made on the line. Getting a link to a comment on a line in a commit might have been helpful to provide additional direct context to what is linked and why, but that's also not what you asked for.
don't click on the commit itself
make sure you're browsing all files as of a commit (not a branch)
Make selection
You should be able to select a line in the file contents and get a link to that line(s) in that version.
note: the link produced here is even more lengthy than the one you provided in your question.
Joy
When you navigate to the copied link, you will be directed to the commit and file contents with the line highlighted.
Understand, this link is bound to the commit you used to create it not to the tip of the branch. I expect this was how links are surfaced to be more sure that the link wouldn't break or lose context as the commit at the tip of the branch changes over time.
Thank you #JoshGust. For anyone else who wants the abbreviated version:
Files -->
(your repo branch) -->
History -->
Click A Commit hash/number (Latest/Head usually) -->
Browse Files -->
Your file -->
Select text & get a link.
Sheesh... quite some hoops to jump through, but glad it's possible.
To create a web (repository) link to a specific line from within your IDE, there are extensions with options to link to files, selections, to a branch or to a specific commit.
I am using these ones:
Editor
Plugin
Visual Studio Code
Git Web Links for VS Code
Visual Studio 2022
Git Web Links

How to change the name of a folder in github

How do I change the name of that folder? I've tried, but nothing online seems to be working. Is there even any way to change its name?
Thanks
Don't use Github.
000webhost is a much, much better alternative and allows the ability to alter the name of folders.
As someone already answered this question link
If you want a better interface (Vscode). you can try online version vscode hosted by official Github.
Open the repo in Github and press . that will redirect you from github.com to github.dev
If this is your first time Install and accept if you agree with the terms,
Now you can just Vscode,
Right side, you will see the Explorer (file-tree).
Go to the folder, right-click and select rename and enter a new name
Once renamed, open Source Control (Third Icon or press control + shift + g)
Enter the commit message and press command + enter
That's it.

How do I change an organization's repository description on GitHub? [duplicate]

When you create a repository on GitHub, you can optionally create a description of the repository. Unfortunately, I wrote a description that no longer adequately describes the code in the repo.
How do I change the repo description?
They changed the looks slightly, the "Edit" button is seen when on the repositories main page, which is the "Code" tab. Here is a screencast/animated-screenshot:
As of 2020, if you chose the new design in feature preview, meta-information about the repository can be changed by clicking on a cog icon in the right-hand side menu's "About" section:
Upon doing so, a popup will appear where the description, website, topics, and homepage settings can be configured:
Click on the Edit that comes when you hover your mouse over the description and project url section
When you hover over the existing description, an Edit button will appear at the far left.
Just in case anyone else has a similar issue as me...
You cannot edit the description until one or more files are committed and pushed. In my specific case, I created the repository from IntelliJ IDEA and accidentally filled the description with text I had intended for the first commit. However, I didn't actually commit or push any files.
I went to the repositories page on the GitHub website, where I could see the repository and its description from the repositories page. However, when viewing the individual repository page, the description would not appear and suggestions for setting up the project were the only content displayed. There is no clear indication that you cannot edit the description until a file is uploaded, but once you have done so, the description is clearly displayed and with it a link to edit.
Click on the gear icon like in the image, and then change your repository description
Click "Save Changes"
1.Go into your repository.
2.On the right side About and symbol of setting.
3.Click on the setting.
4.You get Edit repository details.
5.you can change details.
You can do so directly from command-line, without having to interact with GitHub website.
Since the GitHub CLI gh 2.4.0, you can use gh repo edit:
gh repo edit d, --description <string>
# Update the description of the repository
press the Gear Button and you will see the description to update it or delete it
As of 2023, Github UI has been updated again and the option is now located in the top-right corner of a repository page. Click on the Gear Icon next to About, and a new modal will pop up where you can change the description of the repository.

How to display last check-in author name in eclipse starteam?

I am using Star Team plugin in eclipse .
When viewing files in eclipse it appends all the information about the file version,last modified date to the file name but I was not able to append last checked-in author name to file.
Can any one help to identify this in eclipse.
I don't know about this specific plugin, but generally there are three places you check for this:
Preferences -> Team -> Star Team
In the History view, the view menu (upside down triangle on the right)
Also in the History view, check the meaning of all of the buttons on the toolbar there.
If none of those allows additional information, then it is likely that the Star Team provider needs to be extended. File a report with them.

How do you change a repository description on GitHub?

When you create a repository on GitHub, you can optionally create a description of the repository. Unfortunately, I wrote a description that no longer adequately describes the code in the repo.
How do I change the repo description?
They changed the looks slightly, the "Edit" button is seen when on the repositories main page, which is the "Code" tab. Here is a screencast/animated-screenshot:
As of 2020, if you chose the new design in feature preview, meta-information about the repository can be changed by clicking on a cog icon in the right-hand side menu's "About" section:
Upon doing so, a popup will appear where the description, website, topics, and homepage settings can be configured:
Click on the Edit that comes when you hover your mouse over the description and project url section
When you hover over the existing description, an Edit button will appear at the far left.
Just in case anyone else has a similar issue as me...
You cannot edit the description until one or more files are committed and pushed. In my specific case, I created the repository from IntelliJ IDEA and accidentally filled the description with text I had intended for the first commit. However, I didn't actually commit or push any files.
I went to the repositories page on the GitHub website, where I could see the repository and its description from the repositories page. However, when viewing the individual repository page, the description would not appear and suggestions for setting up the project were the only content displayed. There is no clear indication that you cannot edit the description until a file is uploaded, but once you have done so, the description is clearly displayed and with it a link to edit.
Click on the gear icon like in the image, and then change your repository description
Click "Save Changes"
1.Go into your repository.
2.On the right side About and symbol of setting.
3.Click on the setting.
4.You get Edit repository details.
5.you can change details.
You can do so directly from command-line, without having to interact with GitHub website.
Since the GitHub CLI gh 2.4.0, you can use gh repo edit:
gh repo edit d, --description <string>
# Update the description of the repository
press the Gear Button and you will see the description to update it or delete it
As of 2023, Github UI has been updated again and the option is now located in the top-right corner of a repository page. Click on the Gear Icon next to About, and a new modal will pop up where you can change the description of the repository.