Skip to content

mdtalalwasim/Git-Commands

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 

Repository files navigation

Git-Commands

Git Commands are listed here

To cherry-pick a specific commit in Git

To cherry-pick a specific commit in Git

Just go to the target branch first then,

git checkout <target-branch>
git cherry-pick dfa266d //here 'dfa266d' is commit hash. 

Reset to the Last Commit

If you want to discard changes that are not yet committed:
git reset --hard HEAD

Merge Command

If you want to Merge "dev" branch with "Main" branch:
git checkout main   [Note: First switch to Main branch]

git merge dev_branch 

Check Current Branch

git branch

Check Git Current status

git status

Check log

git log

Switch to specific Branch

git checkout put_branch_name_here

Create new Branch

git checkout -b put_new_branch_name_here

Upload all files on the stage for certain folder

git add .

Upload specific files(wasim.txt) on the stage

git add wasim.txt

To force Git to add the ignored file (application.properties), you can use the -f flag with the git add command, as suggested in the hint:

git add -f application.properties

About

Git Commands are listed here

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published