Skip to content

tengssh/gh_getstarted

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 

Repository files navigation

Getting Started with Github & Git

Quick Start

  • Regisiter for a Github account
  • Create a new repository
    1. Select New repository from the drop menu

    2. Create a new repository

  • Upload files

  • Edit files & commit changes
    1. Click the “Edit” button

    2. Commit changes

  • History versions
    1. Click “# commits”

    2. Show commits-history

    3. Show differences

  • New branch
    1. Type in the new branch’s name


    2. Edit files & commit changes
  • Pull request & merge
    1. Edit files & pull request

    2. Merge pull request

  • Revert changes

Adding Collaborators

  • Manage Access
  1. Click “Settings/Manage Access”

  2. Invite collaborator(s)

Using Git

  • Create a new repository
  • Clone from remote
    • In your Github page

    • In your local machine
      $ git clone <HTTPS_ADDRESS>
      
  • Git configuration
$ git config --global user.name "name"
$ git config --global user.email "username@users.noreply.github.com"
  • Edit files from local
  • Push to remote
    1. Add changes in the working directory to the staging area
    $ git add <YOUR_FILES>
    
    1. Commit changes to the local repository
    $ git commit -m "YOUR COMMENTS"
    
    1. Push to the remote
    $ git push origin main
    
  • List history versions
    $ git log
    
  • Reset changes
  $ git reset <COMMIT>
  • Revert changes (hard reset)
  $ git revert <COMMIT>
  • New branch
    1. List current branches
    $ git branch
    
    1. Create a new branch
    $ git branch <NEW_BRANCH>
    
    1. Switch branch
    $ git checkout <BRANCH>
    

Miscellaneous

  • git status: Check status
  • git diff: Compare difference between working directory & local repository

References

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages