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

Git Assignment 1-5 Share

The document outlines a series of assignments involving Git commands for version control. Each assignment includes steps for creating directories, initializing Git repositories, creating branches, making commits, and merging changes. The assignments demonstrate practical applications of Git functionalities such as branching, stashing, and pushing to remote repositories.

Uploaded by

Tripti singh
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)
10 views

Git Assignment 1-5 Share

The document outlines a series of assignments involving Git commands for version control. Each assignment includes steps for creating directories, initializing Git repositories, creating branches, making commits, and merging changes. The assignments demonstrate practical applications of Git functionalities such as branching, stashing, and pushing to remote repositories.

Uploaded by

Tripti singh
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/ 5

ASSIGNMENT 1

1 cd Assignment1
2 git init
3 nano code.txt
4 nano log.txt
5 nano output.txt
6 git add .
7 git status
8 git commit -m "this is my first commit"
9 git status
10 git remote add origin https://github.com/Kiaraintellipaat/Git.git
11 git push origin master
12 history

ASSIGNMENT 2
3 mkdir Assignment2
4 cd Assignment2
5 git init
6 nano feature1.txt
7 nano feature2.txt
8 git status
9 git add .
10 git commit -m "this is my second commit"
11 git branch
12 git branch develop
13 git branch
14 git branch feature1
15 git branch feature2
16 git branch
17 git checkout develop
18 git branch
19 nano develop.txt
20 git stash -u
22 git checkout feature1
23 git branch
24 nano new.txt
25 git add .
26 git commit -m "this is my third commit"
27 git checkout develop
28 git stash pop
29 git add .
30 git commit -m "this is my commit for stashed file"
Assignment 3
mkdir assignment3
51 cd assignment3
52 git init
53 git branch Develop
54 nano main.txt
55 git add .
56 git commit -m "fourth commit"
57 git branch Develop
58 git branch f1
59 git branch F2
60 git checkout Develop
61 touch develop.txt
62 git add .
63 git commit -m "1"
64 git checkout f1
65 touch f1.txt
66 git add .
67 git commit -m "2"
68 git checkout F2
69 touch f2.txt
70 git add .
71 git commit -m "3"
72 git remote add origin
https://github.com/Kiaraintellipaat/Assignment2.git
73 git push origin --all
74 git branch -D F2
75 git branch
76 git checkout master
77 git branch -D F2
78 git branch
79 git push origin --delete F2
80 git push origin --delete f1
81 git checkout Develop
82 ls
83 cat develop.txt
84 git pull origin master
85 git pull origin Develop
86 git branch
87 ls
88 cat develop.txt

ASSIGNMENT 4

mkdir assign4
103 cd assign4
104 git init
105 nano master.txt
106 git status
107 git add .
108 git commit -m "this 4th assignment"
109 git branch
110 git branch public1
111 git branch public2
112 git branch private
113 git checkout public1
114 nano public1.txt
115 git add .
116 git commit -m "public 1"
117 git checkout master
118 ls
119 git merge public1
120 ls
121 git branch
122 git merge public2
123 git branch
124 git checkout private
125 ls
126 nano master.txt
127 git status
128 git add .
129 git commit -m "this is my edited fie"
130 ls
131 cat master.txt
132 git branch
133 git checkout public1
134 cat master.txt
135 git merge private
136 cat master.txt
137 git checkout public2
138 ls
139 cat master.txt
140 git merge private
141 cat master.txt
142 git checkout master
143 ls
144 cat master.txt
145 git merge private
146 cat master.txt
147 git checkout private
148 git merge master

ASSIGNMENT 5

51 mkdir Assignment5
52 cd Assignment5
53 git init
54 nano master.txt
55 git add .
56 git commit -m "Commiting master.txt"
57 git branch F1
58 git branch F2
59 git branch develop
60 git branch
61 git checkout F1
62 nano F1.txt
63 git add .
64 git commit -m "2"
65 git checkout F2
66 nano F2.txt
67 git add .
68 git commit -m "3"
69 git checkout develop
70 git merge F1
71 LS
72 ls
73 git merge F2
74 LS
75 ls
76 git branch hotfix
77 git branch
78 git checkout hotfix
79 nano Urgent.txt
80 git add .
81 git commit -m "5"
88 git checkout master
89 git merge hotfix
90 ls
91 history

You might also like