The command line is what every developer should learn and implement into their daily routine.
J1 Projects
Molestias inventore consequatur sapiente eos perspiciatis aliquid est enim laudantium voluptatum laborum. Ab qui magnam repellat et a fugit sunt nihil temporibus numquam accusamus asperiores consequuntur. Accusamus sit ex ipsum ducimus et repudiandae ipsam sit molestiae animi distinctio blanditiis nulla iure. Qui qui voluptas sed quo at. Omnis modi qui cum excepturi aliquam quae nam aut ullam eveniet enim quod.
Create projects
Laudantium perferendis sunt et voluptatem qui repellat quasi. Voluptas possimus dolor omnis incidunt. Dicta aut aut laborum veniam. Consequatur modi animi culpa quas corporis dolores qui nobis molestiae autem ex error nobis. Quam rerum sint omnis eos dignissimos omnis quaerat qui eaque fugit qui eum praesentium fugit.
Manage projects
Omnis quis recusandae officiis natus officiis laboriosam accusantium. Quam id enim repudiandae debitis et. Qui at qui magni et ratione. Sint consequatur eos aliquam distinctio nihil exercitationem. Voluptas omnis nostrum illo rerum nulla quis modi enim.
Git
Voluptatum esse atque optio sunt iure consequatur facere. Aut sunt voluptates molestiae labore repellendus nihil non qui maxime ad. Aut asperiores sunt nulla quidem cupiditate qui. Consectetur nam fugit magni sed aut ex rerum cumque. Sequi sapiente neque enim quo omnis error quis ut illo ea minima alias commodi.
Add the committer identity
git config --global user.name "Juergen Adams"
git config --global user.email "juergen@jekyll.one"
Create a new repository
echo "# New repository" >> README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin https://github.com/jekyll-one-org/heroku_starter_app.git
git push -u origin master
List branches
git branch -a zeigt alle lokalen und entfernten Branches an, hingegen -r nur die entfernten Branches anzeigt.
git branch -a
git branch -r
Delete branches
See: {https://stackoverflow.com/questions/2003505/how-do-i-delete-a-git-branch-locally-and-remotely}[Stackoverflow]
git push -d <remote_name> <branch_name>
Note that in most cases the remote name is origin. In such a case you’ll have to use the command like so.
git push -d origin <branch_name>
git branch -d <branch_name>
Push an existing repository
git remote add github https://github.com/jekyll-one-org/heroku_starter_app.git
git push -u github master
Removing non-repository files
If you want to see which files will be deleted you can use the -n option before you run the actual command:
git clean -n
You can use git-clean. This command will remove untracked files/directories. By default, it will only print what it would have removed, without actually removing them.
Given the -f flag to remove the files, and the -d flag to remove empty directories as well:
git clean -df
Also removing ignored files :
git clean -dfx
Delete a tag
Use the “git tag” command with the “-d” option
git tag -d v2022.1.3
git push -d origin v2022.1.3
Set a Git tag
When modifying remember to issue a new tag command in git before committing, then push the new tag
git tag -a v2022.1.3 -m "v2022.1.3"
git push origin --tags
Update Git Index
The series of commands below will remove all of the items from the Git Index (not from the working directory or local repo), and then updates the Git Index (Index = Cache), while respecting git ignores.
git rm -r --cached . && git add .
git rm -rf --cached . && git add .
Then:
git commit -am "Cleanup files"
git commit -am "New version 2022.1.3"
git commit -am "Prepare new version 2022.1.3"
git commit -am "Latest files of version 2022.1.3"
Add file permissions on Windows
Most of the folks on Windows working with git repo’s use windows git bash for doing git check-ins and check-outs to/from from git repo…. if you are already not using it i will highly recommend use it… pretty neat tool for windows os.
git update-index --chmod=+x 'name-of-shell-script'
List committed files
List all files in the repo, including those that are only staged but not yet committed.
git ls-files
Lists all of the already committed files being tracked by the repo.
git ls-tree --full-tree -r --name-only HEAD
Turn off warnings
You can turn off the warning. This will only turn off the warning, not the function itself.
git config --global core.safecrlf false
Asciidoc
Autem maxime dolores repellendus architecto numquam sunt id nam minus. Iusto tempore aut autem fugit laborum sit et. Laudantium deleniti cum dolor quasi consequatur vel dicta ut labore molestias. Consequuntur iste sed voluptatem dolor at eum veritatis libero commodi atque natus consequatur dolores. Quae beatae laboriosam molestiae.
Frequently used tags
Molestiae eos et amet quisquam est occaecati asperiores rerum illum eius repellat. Ratione voluptates recusandae dolorem ut necessitatibus odio cum quisquam incidunt. Blanditiis est ipsum incidunt aliquam quasi totam soluta nemo et iure quis est aut est. Vero temporibus libero et. Est corrupti similique qui excepturi labore expedita ut.