Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- rm -Rf repo
- mkdir repo
- cd repo
- git init
- mkdir folder
- echo a > folder/a
- echo b > folder/b
- git add .
- git commit -m "First commit."
- rm folder/b
- echo c > folder/c
- git add .
- git commit -m "Second commit."
- cd folder
- git checkout `git log --pretty=format:%H | tail -1` .
- echo "###################################################################"
- git status
- echo "###################################################################"
- rm *
- git checkout `git log --pretty=format:%H | head -1` .
- echo "###################################################################"
- git status
- echo "###################################################################"
- git add .
- echo "###################################################################"
- git status
- echo "###################################################################"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement