GithubHelp home page GithubHelp logo

mtc_il_workshop_github_actions's Introduction

Table of Contents

Github actions deep dive workshop from zero to hero

Git Basic Commands

After installing Git, you can also configure it - most importantly, you can set a username and email address that will be connected to all your code snapshots.

You can learn more about Git's configuration options here: https://docs.craft.do/editor/d/93958d6f-1340-6147-fc3c-1be83d5bfef9/FE067BAC-75E9-40A9-9280-5125A1823AB4/b/7DF294EA-9ABC-40FD-8DD5-E9527B89FF29#50E78A39-91C6-4063-87FA-104A42C4C8BE

git config --global user.name "your-username"
git config --global user.email "your-email"
git init # Create git directory 
git add <file(s)> # Stage changes for next commit 
git add . # Add all files
git commit -m "message" # Create a commit that includes all stages changes 
git log # show the Head and commit history
git status # get the current repository status
git checkout <id> # Move between commits 
git checkout main # Go to latest commit in main branch 

Reverting changes with "git revert"

git revert <id> # Undo Commits - Revert changes of commit by creating a new commit 

Resetting code with "git reset"

git reset --hard <id> # Undo changes by deleting all commits since <id>

Branches

git branch <name> # Create a new branch 
git branch -b <branch-name> # Create a new branch and checkout to newly created branch 
git checkout <branch-name> # Move to new created branch 
git branch -D <branch-name> # Delete branch 
git branch # See all branches
git merge <name> # Merge branches
# Merge from feature branch to main branch 
git checkout main 
git merge feature-restructure 
git branch -D feature-restucture # delete the feature branch

Forks

You can fork the repository and then pull request between different repositories, You need to create a pull request from the original repository and connect to your forked repository.

GitHub actions basic

workflows_jobs_steps

workflows_jobs_steps

First Workflow

name: First Workflow
on: workflow_dispatch # manually trigger the workflow

jobs:
  first-job:
    runs-on: ubuntu-latest
    steps:
      - name: Print greeting 
        run: echo "Hello World"
      - name: Print goodbye
        run: echo "Done - bye"

If you need to run multiple shell commands (or multi-line commands), you can easily do so by adding the pipe symbol ( | ) as a value after the run: key.

Example:

...
run: |
    echo "First output"
    echo "Second output"

mtc_il_workshop_github_actions's People

Contributors

arikbidny avatar microsoft-github-operations[bot] 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.