A long time ago, I created a program to simulate a simple MIPS 5 stage pipeline. This was done as a mini project in my undergraduate days and was implemented using C++, flex and bison. The project included
So, on that note, I decided to try and learn git. (I use SVN, so the concepts are all pretty familiar to me.) Found this online tutorial: https://www.youtube.com/watch?v=Kp5BSBoOw8k
This blog post is just my notes from the tutorial.
1. Creating a git repository in a folder
To reintegrate, you first switch to master
Another reference: http://gitref.org/branching/
.
- the 5 stage pipeline simulator
- a framework for simulating caches
- an assembler for MIPS (which is why flex and bison)
- a very minimal terminal to interact with the simulated machine
So, on that note, I decided to try and learn git. (I use SVN, so the concepts are all pretty familiar to me.) Found this online tutorial: https://www.youtube.com/watch?v=Kp5BSBoOw8k
This blog post is just my notes from the tutorial.
1. Creating a git repository in a folder
git init2. See the status
git status3. Add files / content to git
git add [filename]or
git add . // to add everything in the current directory4. Set user name and email
git config --global user.name "5. Commit changes[user's name]"
git config --global user.email "[email]"
git commitor
git commit -m "6. Clone another repository[change comment]"
git clone [path]or
git clone https://github.com/[username]7. pull changes from the source you cloned from/[repository] .git
git pull8. push commits to the source you cloned from
git push9. if you have a local repository, specify a remote repository as origin
git remote add origin https://github.com/10. Create a branch[username]/[repository] .git
git branch [branchname]11. List all branches
git branchor
git branch -v12. Switch to branch
git checkout [branchname]or if you want to create and switch simultaneously
git checkout -b [branchname]13. Push local branch to remote origin
git push -u origin [branchname]14. reintegrating branches
To reintegrate, you first switch to master
git checkout masterthen merge the branch onto master
git merge [branchname]finally push changes if needed
git push15. Delete a branch
git branch -d [branchname]To delete on origin (Note below that branchname is prefixed with a colon)
git push origin :[branchname]16. Show log
git log17. Tag a point in history as important
git tag -a [comment]18. Any folder may contain a file named .gitignore which lists out one filename to ignore per line. The filenames listed can be unix filename regular expressions such as *.o.
Another reference: http://gitref.org/branching/
.
No comments:
Post a Comment