0% found this document useful (0 votes)
6 views4 pages

GIT Assignments

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views4 pages

GIT Assignments

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

www.staragile.

com

Assignment 1

You have been hired by the client ABC Systems as a


Developer, where in
you are required to manage the source in a Git Repository.
Client would
like to assess your hands on knowledge and skills. Thus,
Client has
requested you to demonstrate the following actions using Git
and GitHub.
You are requested to execute following task :
1. Install Git on AWS ubuntu.
2. Create a directory with name “My Project”.
3. Initialize “My Project” directory as an empty git repository.
4. Place your eclipse project into this Git Repository.
5. Create a .gitignore file and configure it for excluding these
files(*.class, *.settings, *.project)
6. Add the source code into Staging Area.
7. Commit the source code into Local git repository.
8. Create a Remote repository on GitHub.
9. Push the source code from Local repository to Remote
Repository
www.staragile.com

Assignment 2

You have been hired by the client ABC Systems as a


Developer, where in
you are required to manage the source in a Git Repository.
Client would
like to assess your hands on knowledge and skills. Thus,
Client has
requested you to demonstrate the following actions using Git
and GitHub.
You are requested to execute following task :
• Initialize any folder as Git Repository
• Create a file as file1.java and file2.java
• Add to the staging area and do a commit.
• Now add file3.java
• Create a Stash for file3.java
• Verify the stash list that changes have been stored
temporarily as
Stash.
• Apply the stash back to the branch
• Clear the Stash
• Add file3.java to the staging area
• Commit file3.java to the repository
• Do a soft reset to 1st commit.
• Revert the reset by doing a commit.
www.staragile.com

• Do a mixed reset to 1st commit.


• Revert the reset by adding the files to staging area and
commit.
• Do a hard reset
• Verify that changes have been removed from the system

Assignment 3

You have been hired by the client ABC Systems as a


Developer, where in
you are required to manage the source in a Git Repository.
Client would
like to assess your hands on knowledge and skills. Thus,
Client has
requested you to demonstrate the following actions using Git
and GitHub.
You are requested to execute following task :
1. Create a file Demo.java which prints “Hello World”.
2. Create 2 branches out of this master. Feature1 and Feature2.
3. Make changes in feature 1 branch in the same line of code.
4. Commit the code in feature1 branch.
5. Now checkout the feature2 branch and make a change in
the same
line as you did in feature1.
6. Commit the code in feature 2 branch
7. Merge the Feature2 branch in Feature1 branch. It should
give a
www.staragile.com

merge conflict.
8. Resolve the merge conflict with the help of Kdiff3 or Meld
tool.
9. Verify the merge using git log command

You might also like