Monday 18 March 2019

GIT HANDS-ON

Merge handson
Step1
git branch
git checkout feature1

Step2
git checkout master
git merge feature1

Step3
git checkout feature2
git checkout master
git merge feature2

Step4
git status

Step5
git commit -a
In vim file write
status and commit the changes

Step6
git branch -d feature1
git branch -d feature2

Undoing changes handson

Step1
git log --oneline
cat hello.py

In vim write
print("Hello World")
git commit -am "updated print statement"


Step2
git diff HEAD
git checkout hello.py

Step3
git status
git diff --cached
git reset

Step4
git status
git reset --hard HEAD

Step5
git reset HEAD~1
git commit -am "commit to revert"
git log --oneline
git show HEAD
git revert HEAD

Step 6
git revert HEAD...HEAD~3 --no-edit
cat hello.py
git log --oneline
2nd handson
Step 1:
ls
git init
Step2:
git remote add origun /s/remote-repo
git remote -v

Step3
git push origin master

Step4
git pull origin master

Step5
git clone <url>

1st handson
Step3:
git add hello-world.js
Step4:
git commit -m "commit message"
Step5:
touch .gitignore
git add .gitignore


REBASE

    git clone /s/remote-project/chceknumber

    cd checkNumber

    cat check_number.py

    sed -i -e "\$aelse: \n print('{0} is Odd'.format(num))" check_number.py

    sed -i '1s/^.*$/#Checks whether number 4 is even or odd/' check_number.py

    cat check_number.py

    git add check_number.py

    git commit -m "<message>"

    git fetch origin master

    git diff master origin/master

    git pull --rebase origin master

    vim check_number.py

    >>#Read......or odd    //delete everything else from <<<<<HEAD to #blue comment

    git add check_number.py

    git rebase --continue

    git log

    git push origin master

30 comments:

  1. Replies
    1. This comment has been removed by the author.

      Delete
    2. Yes, help us with rebase handson above is not working

      Delete
  2. Merge handson is not working properly

    ReplyDelete
  3. please update git rebase hands on

    ReplyDelete
  4. This comment has been removed by the author.

    ReplyDelete
  5. post git rebase hands on

    ReplyDelete
  6. Plz post the sql/plsql and java practice assignment solution

    ReplyDelete
  7. Please post jenkins handson answers.

    ReplyDelete
  8. Plz post jenkins hands on answers.

    ReplyDelete
  9. please provide methods and tools final Quiz answers.

    ReplyDelete
  10. pleaase post final assessment answer

    ReplyDelete
  11. I have got more informative data through your blogdocument registration service A dedication of appreciation is all together to share such a dumbfounding information......


    ReplyDelete
  12. Really a awesome blog for the freshers. Thanks for posting the information.
    Devops Training in Delhi

    ReplyDelete
  13. Excellent site you have got here.. It’s hard to
    find high quality writing like yours these days. I seriously appreciate individuals like you!
    Take care!! espn.com/activate
    xfinity.com/authorize

    ReplyDelete
  14. Undoing hands on not working, please suggest on this.

    ReplyDelete
    Replies
    1. yes it is failing ..please help

      Delete
    2. Undoing changes - is not working. Could you please help?

      Delete
  15. Your local git repository will be linkedlist_python.

    Push the master branch of local git repository to the remote repository.

    Create a new branch with the name new_branch.Make a change to the Python program file (do not remove it), make a commit and push the branch.

    Make a few more changes to the Python program file and stash those changes.



    please answer this

    ReplyDelete
  16. git rebase handson please update

    ReplyDelete
  17. Please post intersteller GIT_FP hands On

    ReplyDelete
  18. you are the saviour ... great thanks

    ReplyDelete
  19. thankyou it worked

    ReplyDelete
  20. answer for Git: Distinguish good and bad commit. please

    ReplyDelete
  21. Working on remote is giving error. Git push origin master showing no git repo ../. assesment/remote even though I have added the origin. It is asking for username and password.

    ReplyDelete
  22. For "Working on Remote" hands-on Use the below:

    ls

    cd test

    git init

    git remote add origin ../.assessment/remote

    git remote -v

    touch abc.txt

    git add abc.txt

    git commit -m "new file abc.txt"

    git push origin master -- on giving this it is asking for some username and password.. dono how to proceed further?

    cd ..

    bash .clone_sh

    ls

    cd test

    git pull origin master

    cd ..

    ls

    cd clone

    git clone https://github.com/frescoplaylab/hello-world.git

    ReplyDelete

FAQs of BCG

These are the some FAQS of BCG PLEASE USE BELOW LINK Details and FAQS of BCG