Kayıtlar

git etiketine sahip yayınlar gösteriliyor

Git, GitHub

Git - Distributed Version Control System GitHub - A web site that you can upload your repositories online. rebase -You can reorder commits simply by changing their order -You can choose to completely omit some commits. This is designated by pick -- toggling pick off means you want to drop the commit. -Lastly, it allows you to combine commits. git rebase -i HEAD~4 ^ goes parent commit git checkout bugFix^ ~ move a lot of parent commit instead of going one parent commit git branch -f master HEAD~3 moves (by force) the master branch to three parents behind HEAD revert - In order to reverse changes and share those reversed changes with others. git revert HEAD reset - reverts changes by moving a branch reference backwards in time to an older commit. git cherry-pick <Commit1> <Commit2> <...> you would like to copy a series of commits below your current location git cherry-pick c2 c4

Git Reference Book - Free Book on Git

The Book is located in https://git-scm.com/book/en/v2

Git Remote Commands

Git Remote Commands Command Listing git status git remote add origin git@github.com:scm-ninja/git-demo.git git remote -v git push -u origin master git push origin master ls cd web/ mate index.html clear git commit -am "Updating index page for GH" git status git pull origin master git push origin master Command Reference Creating a remote repository reference git remote add remote-name remote-repository-location Using  git remote add  command allows us to associate a remote repository. Normally, you want to paste in the full URL for the remote repository given to you by your Git host (GitHub). By convention, the first or primary remote repository is named  origin . List Git's Remotes git remote -v The  git remote  command lists the names of all the remote repositories and the -v parameter (verbose) will display the full URL of the remote repository for each remote name listed Send Changes to Remote git push -u remote-name branch-name gi...

Github - SSH Authentication Commands

SSH Authentication Commands Command Listing cd ~ cd .ssh mkdir .ssh cd .ssh pwd ssh-keygen -t rsa -C "jason@jasongtaylor.com" mate id_rsa.pub ssh -T git@github.com Command Reference Generating an SSH Key ssh-keygen -t rsa -C "your.name@your-company.com" Use your actual email address in the example above. Verify SSH authentication ssh -T git@github.com Above command uses  ssh  to connect to GitHub over the SSH protocol.

Git History / File Management Commands

Git History / File Management Commands Lecture Command Listing -- History git log git help log git log --oneline --graph --decorate --color Lecture Command Listing -- Removing Files pwd git status mate debug.log ls git status git add . git status git commit -m "adding log file that really does not belong here" clear git status git rm debug.log ls git status git commit -m "removing log file" clear mate info.log ls git add info.log git commit -m "adding info log" git status clear ls rm info.log ls git status git add . git add -u clear git status git commit -m "Removing info.log" Command Listing -- Moving Files ls mkdir web ls git mv index.html web cd web/ ll pwd cd .. ls git status git commit -m "Moving index.html file to web folder" clear Command Listing -- Ignoring Files mate application.log ls git status mate .iitignore git status ls -a git add .gitignore clear git status git commit -m "adding ignore file...

Sample Git Log

Gunay-Local:website gunaygultekin$ git log commit 157e29ed59534296f04695a0b253f7ffe8b60148 ( HEAD -> master ) Author: Günay Gültekin <gunaygultekin@gmail.com> Date:   Sun Mar 11 14:17:35 2018 +0300     Adding a message in Readme file commit 49814b4bcfd6a54db8ec44d47e55550ff6cc02ce Author: Günay Gültekin <gunaygultekin@gmail.com> Date:   Sun Mar 11 14:13:25 2018 +0300     Adding web project generated by initializr commit 06b3bb92616a09d7365c13d3677aa8a477a3e68e Author: Günay Gültekin <gunaygultekin@gmail.com> Date:   Sun Mar 11 13:58:13 2018 +0300     Adding more ipsum commit 01eea675e9c896df5e74df03a68099897d7981c7 Author: Günay Gültekin <gunaygultekin@gmail.com> Date:   Sun Mar 11 13:46:19 2018 +0300     Inline commit message commit 54e075f5e62968d578e48de6d42a2ad391df58d3 Author: Günay Gültekin <gunaygultekin@gmail.com> Date:   S...

Git Working Locally Commands

Git Working Locally Commands Lecture Command Listing - Working Locally, Part One pwd git status mate README.md git status git add README.md git status git commit -m "Adding some ipsum" clear git status mate README.md git status git commit -am "Adding more ipsum" git status Lecture Command Listing - Working Locally, Part Two pwd git status clear mate index.html git status git add index.html git status mate README.md git status clear git status git add README.md git status git commit -m "A few changes for the website" clear mate README.md mate index.html git status git add . git status git commit -m "A few more changes for website" clear mate README.md git status git add README.md git status git reset HEAD README.md clear git status mate README.md git checkout -- README.md mate README.md git status Command Reference Express Commit for Tracked files git commit -am "Awesome commit message" Use the  -a  parameter with the...

Git First Commit Commands

Git First Commit Commands Lecture Command Listing pwd ls mate README.md ls git status git add README.md git status git commit -m "Initial commit" clear git status Command Reference List ls Lists files and folders in current directory. Without parameters, will list non-hidden folders and files. Git Status git status Shows which files have been modified in the working directory vs Git's staging area. Git Add git add file-name Adds the new or newly modified  file-name  to Git's staging area (index). Git Commit git commit -m " A really good commit message " Commits all files currently in Git's staging area. The -m parameter allows for a commit message directly from the command line. Clear! clear Clears all previous commands from the terminal screen -- just a bit of clean up. All command line demos are preformed on the MacOS. Creating and editing files is done with Atom (free).

Git Starting Commands

Git Starting Commands Lecture Command Listing - Fresh Start pwd cd projects/ git init git-demo Lecture Command Listing - Start with Existing Project pwd cd projects/ cd website/ ls git init Command Reference Present Workding Directory pwd Change Directory cd folder-name Git initialization git init [ project-name ] project-name  parameter is optional. If not supplied, Git will initialize the current directory.

Git Help Commands

Git Help Commands Help commands here Lecture Command Listing git help git help config Command Reference Getting general help: git help Help Command Syntax -- getting help about a specific Git command: git help command

Configuration Commands

Configuration Commands Git Configuration Commands What's the current directory (present working directory)? pwd Git Config (Global/User-level) Syntax git config --global setting value Configure User and Email General Syntax: git config --global user.name "Your Name" git config --global user.email "you@someplace.com" Example using course author's information: git config --global user.name "Jason Taylor" git config --global user.email "jason@jasongtaylor.com" Listing All Global Configuration Settings git config --global --list Seeing Git's User-based Config file cat ~/.gitconfig

Fork the repository and clone your fork

You could make your changes directly to the master branch in your fork, but when contributing to a public repository, it’s standard practice to make the changes in a non-master branch within the fork. This way, you can easily keep your master branch up-to-date with master of the original repository, and merge changes from master into your branch when you are ready. Note for Windows Users:  The story has grown so large that it exceeds Windows' path length limit. If you encounter an error when cloning you can work around it by modifying a configuration setting. Run this command in git bash:  git config --system core.longpaths true .

Getting git to work with a proxy server

git config --global http.proxy http://proxyuser:proxypwd@proxy.server.com:8080 change  proxyuser  to your proxy user change  proxypwd  to your proxy password change  proxy.server.com  to the URL of your proxy server change  8080  to the proxy port configured on your proxy server If you decide at any time to reset this proxy and work without proxy: Command to use: git config --global --unset http.proxy Finally, to check the currently set proxy: git config --global --get http.proxy OR Step 1:  Open Git BASH Step 2:  Look for  .gitconfig , executing following command: git config --list --global --show-origin Step 3:  Copy the below content in  .gitconfig : [http] proxy = http://YOUR_PROXY_USERNAME:YOUR_PROXY_PASSWORD@YOUR.PROXY.SERVER:YOUR.PROXY.SERVER.PORT sslverify = false [https] proxy = http://YOUR_PROXY_USERNAME:YOUR_PROXY_PASSWORD@YOUR.PROXY.SERVER:YOUR.PROXY.SERVER.PORT sslverify ...

GIT - graph and oneline parameters

  git log --graph --oneline  * 3884eab Add color * 3e42136 now using requestAnimationFrame * 4035769 frame interval was set wrong after game was paused * 25ede83 a couple missing ends with the ipad version * df03538 I can't spell 'screen' apparently :) * b0678b1 Revert controls * f19cb1b Fix typo in space * 75928a9 Use space for movement and enter for shooting * ac83b72 mostly finished ipad version * 7ca4826 trying to get div touch controls to work * 3cb406e first pass at ipad controls * fe7993e now capturing down key so people don't accidently scroll the page * 343935f added license * 80f3bc7 increased canvas size * 7dc3de0 made the framerate counter dumb but more accurate * f077ea3 added pointInPolygon method for moz * 5cb7bed added reverseTransform method * a53b00a trying to get ff collision detection working * 1e47136 matrix really only needs to be a 2x3 * 186453f small changes * c0b670e you get 200 Quatloos for shooting a big flying saucer * ...

Git - Commit Message Style Guide

Commit Messages Message Structure A commit messages consists of three distinct parts separated by a blank line: the title, an optional body and an optional footer. The layout looks like this: type: subject body footer The title consists of the type of the message and subject. The Type The type is contained within the title and can be one of these types: feat:  a new feature fix:  a bug fix docs:  changes to documentation style:  formatting, missing semi colons, etc; no code change refactor:  refactoring production code test:  adding tests, refactoring test; no production code change chore:  updating build tasks, package manager configs, etc; no production code change The Subject Subjects should be no greater than 50 characters, should begin with a capital letter and do not end with a period. Use an imperative tone to describe what a commit does, rather than what it did. For example, use  change ; not changed or chang...