-
Notifications
You must be signed in to change notification settings - Fork 6
git exercise daniel malka #30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
| 5. no | ||
| 6. force checkout let you switch to another branch even if you did not stage your changes but makes a local copy of the file. | ||
|
|
||
| # Reset |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great
| # Changes in the working tree and switch branches | ||
| 1. git branch -a shows we are in feature/lambda_migration2 | ||
| 2. create a new file: echo "newfile" > take.txt then add it to the index git add take.txt | ||
| 3. the error we got is because we didn't commit take.txt, there are 2 approaches - to commit the changes or stash them. to stash a change is to temporarily save it without the need to commit it, so you can work on another branch and get back to it later. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great
| 2. git tab > log > double click on lambda_migration | ||
| 3. select reconnect() commit and click on cherry-picking, then on restrict extensions and click on cherry-picking | ||
| 4. two files: app.py and config.json | ||
| 5. the cherry-picking order matters since if we will go back to an older commit the newer will not be available |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good
| 2. red | ||
| 3. after git add command on abc.txt - the color changed to green | ||
| 4. echo "2" >> abc.txt | ||
| 5. the color changed to red again (using git status command) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The color should be blue (the question refer to PyCharm's project view, not to git)
| 5. the color changed to red again (using git status command) | ||
| 6. use the command git diff | ||
| 7. because we did not add the changes in abc.txt to the index | ||
| 8. because there is no branch called stage2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good
| 2. create and switch to the new branch: git checkout -b feature/lambda_migration | ||
| 3. merge feature/version1 to feature/lambda_migration and observe the merged changes using: git merge feature/version1 | ||
| 4. using PyCharm - select git > merge > feature/version2 | ||
| 5. select app.py and click merge > click on all to show all files > use annonate git blame on both version and accept left (port 8081) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great
No description provided.