Giter Site home page Giter Site logo

github_tut's Introduction

To Get Start

Download GitHub Desktop app

Install the application, sign-in with you github account (the one that you are using with github classroom)

then chose the repository that you just fork

picture1

Once done, choose folder that you want to store the project on your local computer

picture2

click on clone to start download the project.

After made change on the project, go back to the github desktop app and observe the change

picture3

To save change or commit the history, locate the bottom left screen, give title to the change history and click on commit to main button.

picture4

once commited, your change file will disappear from the left menu.

Click Push origin button to send the change to github (cloud).

picture5

Creating Repositories (Github web)

Login into you Github account on your perfer web browser.

picture18

Click on the + button on the top right of the screen and click on New repository.

picture19

Give the repository a name and optionally put in a discription.

picture20

Set the repository to Public

picture21

click on add a README file and click on Create repository button.

picture22

Congratulation, you have created a repository.

picture23

Change Repository remote origin

To change the repository remote origin, you will need a new repository that you want to change to and a clone of the repository that you want to change from.

picture24

Copy the repository url from the new repository.

picture25

Open the repository that you want to change from on VS Code and open the terminal.

picture26

Type in git remote set-url origin <new repository url> and press enter.

picture27

Now add, commit and push the change to the new repository through VScode UI.

picture28

Git In VS Code

Green vertical line after line number indicate the incoming update to the repository.

picture5

Blue vertical line after line number indicate the outgoing update to the repository. if you click on the blue line, you will see the change that you made.

picture6

Github Desktop

  • Green color indicate the additional data is added to the repository.
  • Red color indicate the data is deleted from the repository.
  • Orange color indicate the data is modified in the repository.

picture7

1. History

On Github Desktop, you can see the history tab on the right of Changes tab. Click on it to see the history of the repository.

picture8

each commit that we save will be shown on the history tab. Click on the commit to see the change that we made.

2. Git Revert

If you want to revert the change that you made, right click on any history that you want to reverted and click on Revert changes in commit.

picture9

3. Dealing with Conflict

If your change is impact or about to overwrite the current content that exist on your project, a prompt to resolve conflict will appear.

picture11

Switch to VS Code to resolve the conflict. file that marked as conflicted will have >>>>>> and <<<<<< on the file and colored in red or orange.

picture10

click on the conflicted file and click on Resolve in Merge Editor button on the bottom left of the screen. the incoming change will be on the left side and the outgoing change will be on the right side.

picture12

click Accept Incoming Change to accept the incoming change or click Accept Current Change to accept the outgoing change.

picture13

click Accept Both Changes to accept both change.

click Complete Merge to complete the merge.

picture14

Branching

Branching is a way to work on different version of a repository at one time. By default, your repository has one branch named main which is considered to be the definitive branch. We use branches to experiment and make edits before committing them to main.

When you create a branch off the main branch, you’re making a copy, or snapshot, of main as it was at that point in time. If someone else made changes to the main branch while you were working on your branch, you could pull in those updates.

1. Create Branch

To create a new branch, click on the Current Branch button on the top left of the screen and click on New Branch.

picture14

Give the branch a name and click Create Branch button.

picture15

Any change you made on the new branch will not affect the main branch.

2. Merge Branch

To merge the branch to main branch, click on the Current Branch button on the top left of the screen and click on main branch.

PICTURE16

Click on Choose a branch to merge into main button.

pciture17

Click on the branch that you want to merge and click Create a merge commit button.

github_tut's People

Contributors

joechea-aupp avatar cheasingh avatar saturday21 avatar restyled-commits avatar sanpiseth-beep avatar

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.