0% found this document useful (0 votes)
21 views5 pages

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)
21 views5 pages

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

ASSIGNMENT 1

1 cd Assignment1
2 git init
3 nano [Link]
4 nano [Link]
5 nano [Link]
6 git add .
7 git status
8 git commit -m "this is my first commit"
9 git status
10 git remote add origin [Link]
11 git push origin master
12 history

ASSIGNMENT 2
3 mkdir Assignment2
4 cd Assignment2
5 git init
6 nano [Link]
7 nano [Link]
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 [Link]
20 git stash -u
22 git checkout feature1
23 git branch
24 nano [Link]
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 [Link]
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 [Link]
62 git add .
63 git commit -m "1"
64 git checkout f1
65 touch [Link]
66 git add .
67 git commit -m "2"
68 git checkout F2
69 touch [Link]
70 git add .
71 git commit -m "3"
72 git remote add origin
[Link]
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 [Link]
84 git pull origin master
85 git pull origin Develop
86 git branch
87 ls
88 cat [Link]

ASSIGNMENT 4

mkdir assign4
103 cd assign4
104 git init
105 nano [Link]
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 [Link]
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 [Link]
127 git status
128 git add .
129 git commit -m "this is my edited fie"
130 ls
131 cat [Link]
132 git branch
133 git checkout public1
134 cat [Link]
135 git merge private
136 cat [Link]
137 git checkout public2
138 ls
139 cat [Link]
140 git merge private
141 cat [Link]
142 git checkout master
143 ls
144 cat [Link]
145 git merge private
146 cat [Link]
147 git checkout private
148 git merge master

ASSIGNMENT 5

51 mkdir Assignment5
52 cd Assignment5
53 git init
54 nano [Link]
55 git add .
56 git commit -m "Commiting [Link]"
57 git branch F1
58 git branch F2
59 git branch develop
60 git branch
61 git checkout F1
62 nano [Link]
63 git add .
64 git commit -m "2"
65 git checkout F2
66 nano [Link]
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 [Link]
80 git add .
81 git commit -m "5"
88 git checkout master
89 git merge hotfix
90 ls
91 history

You might also like