0% found this document useful (0 votes)
12 views

ASSIGNMENT 1

The document outlines a series of Git commands for managing a project repository. It includes instructions for configuring user details, cloning a repository, creating a branch, adding and committing files, pushing changes, pulling updates, and removing files. Each command is presented clearly for practical execution in a Git environment.

Uploaded by

vishwasgowda0716
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)
12 views

ASSIGNMENT 1

The document outlines a series of Git commands for managing a project repository. It includes instructions for configuring user details, cloning a repository, creating a branch, adding and committing files, pushing changes, pulling updates, and removing files. Each command is presented clearly for practical execution in a Git environment.

Uploaded by

vishwasgowda0716
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/ 3

ASSIGNMENT 1

Gowtham B (2738190)
Vijaya Vittala Institute Of Technology
1. Configure your Git with your name and email.
What commands would you use to set your username and email globally?
git config --global user.name "Gowtham B"
git config --global user.email "[email protected]"

2. Clone the project repository from GitHub.


What command would you use to clone the repository from the following URL:
https://github.com/Gowtham-1603/DEVOPS
git clone https://github.com/Gowtham-1603/DEVOPS
3. Create a new feature branch.
What command would you use to create and switch to a branch called new-feature?
git checkout -b new-feature

4. Add a new file called feature.py to your branch.


What command would you use to stage this new file for commit?
git add feature.py

5. Commit your changes with a message.


What command would you use to commit your staged changes with the message "Add new
feature implementation"?
git commit -m "Add new feature implementation"

6. Push your changes to the remote repository.


What command would you use to push your changes in the new-feature branch to the remote
repository?
git push origin new-feature
7. Pull the latest changes from the main branch.
What command would you use to pull the latest changes from the main branch of the remote
repository?
git pull origin main

8. Remove the feature.py file from your branch.


What command would you use to remove feature.py from your repository?
git rm feature.py

9. Commit the removal of the file and push the changes.


What commands would you use to commit the removal and push the changes to the remote
repository?
git commit -m "Remove feature.py"
git push origin new-feature

You might also like