GithubHelp home page GithubHelp logo

raghsgit / github-slideshow Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 3.45 MB

A robot powered training repository :robot:

Home Page: https://lab.github.com/githubtraining/introduction-to-github

License: MIT License

Ruby 2.81% HTML 56.46% Shell 40.74%

github-slideshow's Introduction

Publishing Your Pages Using Github

  1. check if git is installed git --version
  2. Create a local repo mkdir repoName
  3. initialize this repo git init
  4. create first file say index.html touch index.html
  5. check the status git status #it shows that git is aware of the file but it is not added to the repo.
Tracked and Untracked file
  • Tracked - files that Git knows about and are added to the repository
  • Untracked - files that are in your working directory, but not added to the repository`
Git staging environment

Staged files are files that are ready to be committed to the repository you are working on.
git add file_name

Git Commit

Git considers each commit change point or "save point". It is a point in the project you can go back to if you find a bug, or want to make a change.
Pro Tip : Always include a message while commiting file.
git commit -a -m message
-a: If file are not staged, it stages the file and commit -m: It adds a message

Git Commit Log

git log

Git Help
  • git command -help - See all the available options for the specific command
  • git help --all - See all possible commands
Publishing the page
  1. Add a index.html in your project
  2. Create gh-pages branch of this repository
  3. Now go to setting to find : your site is published at github_id.github.io/repo_name
  4. share that link

Setting Up git on your Local Machine

first install Git
sudo apt-get install git


configure git
git config --global user.name "your_user_name"
git config --global user.email "email_id"


To check configured user name and user email
git config --global user.name
git config --global user.email
Or Use
git config --global --list


create a local repository
git init my_repository
cd my_repository
gedit readme
gedit mycode.c


now add above two files in index.
git add readme
git add mycode.c


once we have made all the changes, we commit it
git commit -m "some_massage"


Now create a repository on github website


Add origin in your local repository
git remote add origin https:github.com/user_name/my_repository.git


Now push files

git push origin master


Resolving Issues


If on adding remote origin gives following error
raghvendra@raghs-pc:~/raghsgit$ git remote add origin https://github.com/raghsgit/raghsgit.git
fatal: remote origin already exists.

Resolving
raghvendra@raghs-pc:~/raghsgit$ git remote rm origin


Download a Project On your system to start work locally

  1. Download the repository with its content
    git clone "<url of project>"

  2. now edit the files

  3. Now add (prepare) files to upload.
    git add *

  4. if there is a problem in adding files, one solution is to add file forcefully git add -f *

  5. Commit the changes, with a message. git commit -m "message"

  6. Upload your file to server git push origin master

To synchronize with local repository

  1. Add origin master if not added already
    git remote add orign https://githubs.com/raghsgit/raghsgit.git

  2. Now Pull the code from server
    git pull origin master

  3. to remove origin master
    git remote rm origin

some Other useful Command

git remote -v
git remote add upstream
git remote -v

git fetch upstream
git fetch --all
git checkout master
git checkout gh-pages
git merge upstream/master

git fetch create new branch git checkout -b <branch_name> or to switch a branch git checkout <branch_name> to merge in header branch=> git merge origin/<branch_name>

Git new branch
  • git branch new_branch_name- create new branch
  • git branch - Shows all the branches
  • git checkout branch_name - change the branch
  • update files in this branch and stage and commit the file
  • to merge new branch with master branch:: *1. git checkout master -change the branch to master *2. git merge new_branch- master branch is merged with new_branch
    1. As the new_branch and master branch are essentially same, so we can delete new_branch git branch -d new_branch
Merge Conflict
  • open the file in editor and fix the conflict
  • commit the changes

Push local repository to Github

  • create a repo in the github & copy url of the repo from code section
    URL: https://gihub.com/<user_name>/repo_name.git
  • git remote add origin URL -specifies that you are adding a remote repository, with the specified URL, as an origin to your local Git repo.
  • git push --set-upstream origin master git push push our master branch to the origin url, and --set-upstream set master branch as the default remote branch
Git Pull
  • pull == fetch+merge

Markdown syntax guide

Headers

This is a Heading h1

This is a Heading h2

This is a Heading h6

Emphasis

This text will be italic
This will also be italic

This text will be bold
This will also be bold

You can combine them

Lists

Unordered

  • Item 1
  • Item 2
  • Item 2a
  • Item 2b

Ordered

  1. Item 1
  2. Item 2
  3. Item 3
  4. Item 3a
  5. Item 3b

Images

This is a alt text.

Links

You may be using Markdown Live Preview.

Blockquotes

Markdown is a lightweight markup language with plain-text-formatting syntax, created in 2004 by John Gruber with Aaron Swartz.

Markdown is often used to format readme files, for writing messages in online discussion forums, and to create rich text using a plain text editor.

Tables

Left columns Right columns
left foo right foo
left bar right bar
left baz right baz

Blocks of code

let message = 'Hello world';
alert(message);

Inline code

This web site is using markedjs/marked.

github-slideshow's People

Contributors

brianamarie avatar carolynshin avatar crichid avatar dependabot[bot] avatar githubteacher avatar hectorsector avatar jasonetco avatar snyk-bot avatar

Watchers

 avatar

github-slideshow's Issues

Getting Started with GitHub

πŸ‘‹ Welcome to GitHub Learning Lab's "Introduction to GitHub"

To get started, I’ll guide you through some important first steps in coding and collaborating on GitHub.

πŸ‘‡ This arrow means you can expand the window! Click on them throughout the course to find more information.

What is GitHub?

What is GitHub?

I'm glad you asked! Many people come to GitHub because they want to contribute to open source πŸ“– projects, or they're invited by teammates or classmates who use it for their projects. Why do people use GitHub for these projects?

At its heart, GitHub is a collaboration platform.

From software to legal documents, you can count on GitHub to help you do your best work with the collaboration and security tools your team needs. With GitHub, you can keep projects completely private, invite the world to collaborate, and streamline every step of your project.

GitHub is also a powerful version control tool.

GitHub uses Git πŸ“–, the most popular open source version control software, to track every contribution and contributor πŸ“– to your project--so you know exactly where every line of code came from.

GitHub helps people do much more.

GitHub is used to build some of the most advanced technologies in the world. Whether you're visualizing data or building a new game, there's a whole community and set of tools on GitHub that can get you to the next step. This course starts with the basics, but we'll dig into the rest later!

πŸ“Ί Video: What is GitHub?



Exploring a GitHub repository

Exploring a GitHub repository

πŸ“Ί Video: Exploring a repository

More features

The video covered some of the most commonly-used features. Here are a few other items you can find in GitHub repositories:

  • Project boards: Create Kanban-style task tracking board within GitHub
  • Wiki: Create and store relevant project documentation
  • Insights: View a drop-down menu that contains links to analytics tools for your repository including:
    • Pulse: Find information about the work that has been completed and the work that’s in-progress in this project dashboard
    • Graphs: Graphs provide a more granular view of the repository activity including who contributed to the repository, who forked it, and when they completed the work

Special Files

In the video you learned about a special file called the README.md. Here are a few other special files you can add to your repositories:

  • CONTRIBUTING.md: The CONTRIBUTING.md is used to describe the process for contributing to the repository. A link to the CONTRIBUTING.md file is shown anytime someone creates a new issue or pull request.
  • ISSUE_TEMPLATE.md: The ISSUE_TEMPLATE.md is another file you can use to pre-populate the body of an issue. For example, if you always need the same types of information for bug reports, include it in the issue template, and every new issue will be opened with your recommended starter text.

Using issues

This is an issue πŸ“–: a place where you can have conversations about bugs in your code, code review, and just about anything else.

Issue titles are like email subject lines. They tell your collaborators what the issue is about at a glance. For example, the title of this issue is Getting Started with GitHub.

Using GitHub Issues

Using GitHub issues

Issues are used to discuss ideas, enhancements, tasks, and bugs. They make collaboration easier by:

  • Providing everyone (even future team members) with the complete story in one place
  • Allowing you to cross-link to other issues and pull requests πŸ“–
  • Creating a single, comprehensive record of how and why you made certain decisions
  • Allowing you to easily pull the right people and teams into a conversation with @-mentions

πŸ“Ί Video: Using issues


Managing notifications

Managing notifications

πŸ“Ί Video: Watching, notifications, stars, and explore

Once you've commented on an issue or pull request, you'll start receiving email notifications when there's activity in the thread.

How to silence or unmute specific conversations

  1. Go to the issue or pull request
  2. Under "Notifications", click the Unsubscribe button on the right to silence notifications or Subscribe to unmute them

You'll see a short description that explains your current notification status.

How to customize notifications in Settings

  1. Click your profile icon
  2. Click Settings
  3. Click Notifications from the menu on the left and adjust your notification preferences

Repository notification options

  • Watch: You'll receive a notification when a new issue, pull request or comment is posted, and when an issue is closed or a pull request is merged
  • Not watching: You'll no longer receive notifications unless you're @-mentioned
  • Ignore: You'll no longer receive any notifications from the repository

How to review notifications for the repositories you're watching

  1. Click your profile icon
  2. Click Settings
  3. Click Notification from the menu on the left
  4. Click on the things you’re watching link
  5. Select the Watching tab
  6. Click the Unwatch button to disable notifications, or Watch to enable them


Keep reading below to find your first task

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.