Giter Site home page Giter Site logo

dis's Introduction

Github bootcamp!

  1. (Be aware that if something goes wrong, you can always reset your local repository to match the remote by git fetch origin and then git reset --hard origin/<branch name>.
  2. Create personal repo on github.com
  3. Clone this project
  4. Push the project to your own personal repository. Hint: You need to change the remote url by git remote set-url origin <URL>
  5. Check github.com to make sure it’s there.
  6. git status - how does this look?
  7. Edit a file - Change the Main class to include your own username and password.
  8. git status again. How does it look now?
  9. Put the file that you edited into “staging”. Do this through the git add <filename> command. Hint you can user either a * or a . as a wildcard to add all files to staging
  10. git status again. How does it look now?
  11. git commit -m "your message" to commit your changes. Note that it’s very important to make good commit messages, so people can easily identify what you changed. For instance “I created a new method to compute a hash value” is good, where “i edited file” is bad.
  12. git push and check github if your changes was pushed correctly
  13. Find a partner
  14. Play rock, paper, scissors. The winner invites the looser to collaborate on the winner’s repo.
  15. The “looser” clones the winner repository.
  16. Create new branch with git checkout -b <branch-name>
  17. Edit the “winner’s” code.
  18. git commit
  19. git push
  20. The winner changes the code on master to something else again. Remember to git add and git commit
  21. Merge the new branch into master by git merge <branch name>
  22. You should get a merge conflict
  23. In IntelliJ you can fix merge conflicts visually by going to VCS -> Git -> Resolve conflicts. Pick the changed code.
  24. git commit
  25. git push
  26. On the “winner’s” computer, you use the command git pull to get the new changes.
  27. On a piece of paper, try to illustrate the how git has changed. You can use the same structure as https://learngitbranching.js.org/ if you’d like.
  28. Use git log. Does the log fit your illustration? Tip: If you want to save the log in a file, you can use the command git log > log.txt. This command add the output of git log to a textfile called log.txt

Hvis i har mere tid, kan i lave øvelse 1-4 på https://learngitbranching.js.org/

dis's People

Contributors

voldemorten avatar

Stargazers

Roman avatar

Watchers

James Cloos 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.