Skip to content

Challenge 4 #4

@Signior-X

Description

@Signior-X

"Ha Ha Ha... so you tackled all the previous challenges, but this one is going to be your last :P" - Priyam
"Nothing is Impossible" - The Team

In this Challenge, you will learn about git reset and git stash.

To get started for this challenge first create a new branch challenge4 using git checkout -b challenge4.
Now, The task you need to do is to add a commit before the last commit. So, how to do this? There can be many ways to achieve this. One easy technique can be this:

  1. Reset the last commit using git reset HEAD~1. This has uncommitted the last commit. Now check git status.
  2. Observe, these changes will be needed in the future. However, you currently want to set aside these changes so you can focus on a new task. Show use git stash to save the current changes. After stashing do check git status.
  3. After stashing, you can check for using git status. git status is a real friend of yours.
  4. In the spaceShooter.py file, these are the lines 24 and 25
# img_dir = path.join(path.dirname(__file__), 'assets')
# sound_folder = path.join(path.dirname(__file__), 'sounds')

Uncomment these two lines, and then add and commit. This commit should only be having these changes
After you have committed this change, do git log and git status. These will be needed in the report.
5. Pop the stashed changes, and then add the changes and commit them.
6. Now push the changes and make a PR from the challenge4 branch.

HINT:
Take care of the changes done while committing anything. git status will be really helpful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions