Giter Site home page Giter Site logo

ie-hw1's Introduction

internet engineering HW1

This repo created for Third question of internet engineering assignement.

task 1:

touch FileA.txt
git add FileA.txt
git commit -m "initial commit."
echo "This is not empty anymore." > FileA.txt
git commit --amend --no-edit
git push origin master

I use --no-edit flag because there was no need to change commit message.

task 2:

echo "Some secrets..." > .env
git add .env
git commit -m "adding secrects"
git push origin master
git rebase --interactive HEAD~1
# in editor drop the secret commit
git push origin +master

in last command I use +master instead of master that is actually force push and will need not protected branch.

task 3:

echo "New file B" > FileB.txt
echo "New file C" > FileC.txt
git checkout -b file-b-c
git add FileB.txt FileC.txt
git commit -m "new uncertain changes."
git push origin file-b-c

So my colleague can do their review on the code and merge it later.

git checkout file-b-c
# doing some review
git merge master
# merging this changes with new changes on master
git push origin master

task 4:

#creating a branch named new-branch and adding 3 commits.
git checkout -b merge-2
git rebase --interactive --onto master  HEAD~3
# drop commit 1 and 3 and pick commit 2 in editor
git checkout master
git merge merge-2
git push origin master
# now the commit two merged two master
git checkout new-branch
git rebase --interactive --onto master  HEAD~3
# drop commit 2 and squash commit 3 and name squash commit "commit 1 and 3"
git checkout master
git merge new-branch
git push origin master

ie-hw1's People

Watchers

Mehdi Saber 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.