Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .~lock.list.txt#

This file was deleted.

48 changes: 46 additions & 2 deletions command.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,46 @@
hello
i am here
1.git init
2.git clone "url" go to repositories
3.git add . ,git add --all , git add
4.git commit -m " message that"
5.git status check status any change is there
6.git push ("if you want to push to local repo") ,
6.1.git push --set-upstream ("if you want to push to your remote repo)
7.git pull ("to pull data from branch and integrate with our current or local repo")
8.git command for creating branch and merging them :-
8.1.git branch
8.2.git branch ("to list all branch ")
9. command for navigating btween differnet branch
9.1.git checkout < branch name >
9.2.git checkout -b < branch name > (" it will create branch and redirect to that branch ");
10. git merge
11. git Stash =>command takes your uncommitted changes (both staged and unstaged), saves them away for later use, and then reverts them from your working copy.
git stash pop => store data that stash and add back on stash pop
git stash apply => You can also apply the latest stash without removing the stash from the stash stack like this

12. git reset,git reset--hard, help in stage management
13. pull from another branch
13.1 git checkout < branch name >
13.2 git fetch origin
13.3 git merge <branch name 2 >(from where you want to pull)

14 git-fetch - Download objects and refs from another repository


The easiest way to set the upstream branch is to use the “git push” command with the “-u” option for upstream branch.

$ git push -u <remote> <branch>
Alternatively, you can use the “–set-upstream” option that is equivalent to the “-u” option.
$ git push --set-upstream <remote> <branch>

git remote add <name> <url>
Create a new connection to a remote repository. After adding a remote, you’ll be able to use <name> as a convenient shortcut for <url> in other Git commands.

git remote rm <name>
Remove the connection to the remote repository called <name>.

git remote rename <old-name> <new-name>
Rename a remote connection from <old-name> to <new-name>.

Git Config => The most basic use case for git config is to invoke it with a configuration name, which will display the set value at that name.
Configuration names are dot delimited strings composed of a 'section' and a 'key' based on their hierarchy. For example: user.email
git config user.email
21 changes: 21 additions & 0 deletions listdemo.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
this file in demo branch

Git hub

git clone

git checkout

git chekout -b

git

git commit

git stash

git push

git pop

git revert