You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: git/GitEYTOC.txt
+96-91Lines changed: 96 additions & 91 deletions
Original file line number
Diff line number
Diff line change
@@ -431,6 +431,8 @@ In summary, git commit is used to create a new commit in Git, which records the
431
431
• Git reset
432
432
433
433
434
+
435
+
434
436
Refer my presentation "Git_OneDay.ppt" slide number 53 then continue if required.
435
437
436
438
undo changes a
@@ -532,97 +534,6 @@ Untracked files:
532
534
(use "git add <file>..." to include in what will be committed)
533
535
file3.txt
534
536
This output shows that file1.txt has been modified and staged, file2.txt is a new file that has been added to the staging area, and file1.txt has been modified but not staged yet. Additionally, there is an untracked file called file3.txt that has not been added to the staging area.
e.g. git remote add origin git@github.com:vilasvarghese/docker-k8s.git
583
-
584
-
585
-
git push
586
-
upload local repository changes
587
-
to a remote repository.
588
-
make changes to files in your local repository, you can use the git push command to send those changes to a remote repository, such as GitHub, GitLab, or Bitbucket. Here are the steps to use the git push command:
589
-
590
-
First, make sure you have changes to push by checking the status of your local repository using the git status command.
591
-
592
-
Next, add the changes you want to push to the staging area using the git add command. For example, if you want to push all changes, use the command git add ..
593
-
594
-
Once you have added the changes to the staging area, create a commit for those changes using the git commit command. For example, use the command git commit -m "Commit message" to create a commit with the message "Commit message".
595
-
596
-
After creating the commit, use the git push command to upload the changes to the remote repository. For example, use the command git push origin master to push the changes to the master branch of the remote repository.
597
-
598
-
If you are pushing to a remote repository for the first time, you may need to specify the remote repository URL using the git remote add command. For example, use the command git remote add origin https://github.com/username/repository.git to add a remote repository named "origin".
599
-
600
-
If your push fails due to conflicts with the remote repository, you may need to pull changes from the remote repository before pushing your changes. Use the git pull command to pull changes, resolve any conflicts, and then try the git push command again.
601
-
602
-
That's it! You have successfully pushed changes from your local repository to a remote repository using the git push command.
When you collaborate with others on a Git project, you may need to download the latest changes made by others and merge them into your local repository. Here are the steps to use the git pull command:
611
-
612
-
First, make sure you are in the local repository that you want to update.
613
-
You can check the current repository using the
614
-
git remote -v command.
615
-
616
-
617
-
If there are any conflicts between the local repository and the remote repository,
618
-
Git will prompt you to resolve them.
619
-
Follow the instructions on the screen to resolve the conflicts manually.
620
-
621
-
Once the merge is complete,
622
-
use the git status command to check the status of the local repository.
623
-
It should show that the local repository is up to date with the remote repository.
624
-
625
-
That's it! You have successfully downloaded changes from a remote repository and merged them into your local repository using the git pull command.
e.g. git remote add origin git@github.com:vilasvarghese/docker-k8s.git
778
+
779
+
780
+
git push
781
+
upload local repository changes
782
+
to a remote repository.
783
+
make changes to files in your local repository, you can use the git push command to send those changes to a remote repository, such as GitHub, GitLab, or Bitbucket. Here are the steps to use the git push command:
784
+
785
+
First, make sure you have changes to push by checking the status of your local repository using the git status command.
786
+
787
+
Next, add the changes you want to push to the staging area using the git add command. For example, if you want to push all changes, use the command git add ..
788
+
789
+
Once you have added the changes to the staging area, create a commit for those changes using the git commit command. For example, use the command git commit -m "Commit message" to create a commit with the message "Commit message".
790
+
791
+
After creating the commit, use the git push command to upload the changes to the remote repository. For example, use the command git push origin master to push the changes to the master branch of the remote repository.
792
+
793
+
If you are pushing to a remote repository for the first time, you may need to specify the remote repository URL using the git remote add command. For example, use the command git remote add origin https://github.com/username/repository.git to add a remote repository named "origin".
794
+
795
+
If your push fails due to conflicts with the remote repository, you may need to pull changes from the remote repository before pushing your changes. Use the git pull command to pull changes, resolve any conflicts, and then try the git push command again.
796
+
797
+
That's it! You have successfully pushed changes from your local repository to a remote repository using the git push command.
When you collaborate with others on a Git project, you may need to download the latest changes made by others and merge them into your local repository. Here are the steps to use the git pull command:
806
+
807
+
First, make sure you are in the local repository that you want to update.
808
+
You can check the current repository using the
809
+
git remote -v command.
810
+
811
+
812
+
If there are any conflicts between the local repository and the remote repository,
813
+
Git will prompt you to resolve them.
814
+
Follow the instructions on the screen to resolve the conflicts manually.
815
+
816
+
Once the merge is complete,
817
+
use the git status command to check the status of the local repository.
818
+
It should show that the local repository is up to date with the remote repository.
819
+
820
+
That's it! You have successfully downloaded changes from a remote repository and merged them into your local repository using the git pull command.
0 commit comments