Quickstart
This quickstart guide will help you create your first repository within the ImperialCollegeLondon organisation.
Creating Your First Repository
- Go to the Create a new repository page.
- Fill in the repository details:
- Repository name: This should be lower case and use hyphens between words. For example
imperial-website-frontend. - Description: Briefly describe the purpose of your repository.
- Visibility: Choose Public, Internal or Private. You can find more information on the available options at Repository visibility.
- Repository name: This should be lower case and use hyphens between words. For example
- Check the Add a README file option. This will initalise the repository with an empty README file.
- (Optional) Select a .gitignore file to use. This is useful if you know what programming language your project will use (e.g. python). You can always add a .gitignore file at a later date.
- (Optionall) Select a license file to use. This is useful if you’re creating an open-source project.
- Fill out the Required properties:
- Department - The department the repository sits under. For example,
Information and Communication Technologies. - Staff-Student - Whether this is predominantly a staff or student project. For example,
Staff.
- Department - The department the repository sits under. For example,
- Click Create repository.
When creating the repository, ensure you set the Required properties. This ensures the repository is properly categorised for auditability. If you forget to do this when creating the repository, you can add them under the Custom properties tab in the repository settings.
Making a change in your repository
Once you’ve created your repository, you’ll want to start making changes to it. This section will guide you through cloning your repository to your local machine, making changes, and pushing those changes back to GitHub.
Cloning your repository locally
To work on your repository locally, you’ll need to clone it to your machine.
- Navigate to your repository on GitHub (e.g.
https://github.com/ImperialCollegeLondon/your-repository-name). - Click the green Code button.
- Copy the HTTPS URL shown (it should look like
https://github.com/ImperialCollegeLondon/your-repository-name.git). - Open a terminal or command prompt on your computer.
- Navigate to the directory where you want to store your repository.
-
Run the following command, replacing the URL with your repository’s URL:
git clone https://github.com/ImperialCollegeLondon/your-repository-name.git -
Once the cloning is complete, navigate into the repository directory:
cd your-repository-name
You can find more information about cloning repositories at Cloning a repository.
Making changes and committing them
Now that you have your repository locally, you can make changes to files.
- Open a file in your text editor and make your changes. For example, you might edit the
README.mdfile to add more information about your project. - Save your changes.
-
In your terminal, check the status of your changes:
git statusThis will show you which files have been modified.
-
Stage your changes using
git add. To stage a specific file:git add README.mdOr to stage all changed files:
git add . -
Commit your staged changes with a descriptive message:
git commit -m "Update README with project description"
A good commit message should be concise and clearly describe what changes you made. For example, “Fix typo in documentation” or “Add installation instructions”.
Pushing changes to GitHub
After committing your changes locally, you’ll need to push them to GitHub so they’re stored remotely and visible to others.
-
Push your changes to the remote repository:
git pushIf this is your first push on a new branch, you may need to use:
git push origin main -
Once the push is complete, navigate to your repository on GitHub to see your changes reflected there.
You can find more information about pushing changes at Pushing commits to a remote repository.