Showing posts with label devops. Show all posts
Showing posts with label devops. Show all posts

Tuesday, 25 February 2020

Make life easier — Git automation with single command file

Make life easier — Git automation with single command file

Posted on medium

#makelifeeasier series - Automation of git related activity.. If you like it do not forget to like the post :-)    

If you are spending lot of time with git commands for creating project repositories, creating feature branches, make changes and commit, syncing remote feature branch, creating pull request to merge request with master, then I have good news for you.


https://link.medium.com/KfIHkrT2n4

Wednesday, 18 September 2019

Issue 01- No valid crumb was included in the request while configuring git with Jenkins

Hi,

Received Error -
No valid crumb was included in the request while setting git url from github in Jenkins Job configuration


Solution -

Enable the below checkbox and the error will be gone.

Tuesday, 10 September 2019

GIT Command reference

Below is list of git commands for quick reference

Initialize git with new Folder

git init [ProjectFolder] 
example - git init sample-git-demo

Initialize git with existing Folder
Navigate to existing folder and execute git init

Display modified files in the working directory vs Git's staging area.
git status

Add new or newly modified filename to Git's staging area
git add [filename]
To add recursively all new and newly modified files.
git add .

Commits all files in Git's staging area
git commit -m "First Commit to git"

Below command to directly commit newly modified already committed files
git commit -am "Second Commit to git"

Reset File from Git's staging area
git reset HEAD [filename]

Checkout last committed version from Git
git checkout -- [filename]

Display Git log history
git log

Creating a remote repository reference
git remote add origin [full URL for the remote repository]

List Git's Remote repos
git remote -v

Send Changes to Remote - The -u parameter is needed the first time
git push -u [RemoteName] [BranchName]
git push [RemoteName] [BranchName]

Receive Changes from Remote

git push [RemoteName] [BranchName]

Make life easier — Git automation with single command file

Make life easier — Git automation with single command file Posted on medium #makelifeeasier series - Automation of git related activity...