$ git checkout work //Go to your own branch of workJob....$ git commit –a //Commit changes to the work branch$ git checkout master //Back to Main branch$ git pull //Get the latest changes remotely, no conflicts at this time$ git checkout work // Back to work Branch$
Each time you open git bash, the default path is C:\Users\alan_zhu, which is cumbersome to switch to working directory (CD D:\forGit) with the CD command.Method 1, modify the GIT bash shortcut in the start in to solve the problem.Method 2, modify the GIT default path directl
Change the default path for git bashWhen you open git bash, each time you are under the C:\Uer path, you need to first switch to the path you want to work with by using the CD command (CD/F/DSS). Modifying the default path when you open Git bash allows you to switch to a dir
git clone https://github.com/JasonCheung2012/learngit.git #版本库网址
git add zhangjiethu.txt
Git commit-m "Add a File"
Git push-u Origin Master # submits your local repository to your GitHub account and asks you to enter your GitHub account number and password
Status of Git
Steps :
1. Open the registry by typing ' regedit ' in ' run '.
2, find [Hkey_classes_root\directory\background].
3, under [Background] if there is no [shell], then right-new item [Shell].
4, right under [Shell]-New Item [Open in Git], the value is "Git Bash here", this is the right key menu display name.
5, in the [Shell] right-new-string value [Icon], doubl
The previous article, using node. js to build an HTTP server, and then start in cmd, this time try Git bash.Git bash is also a command line tool, better looking, easier to use, and can replace CMD.Download git:https://git-for-windows.github.io/Installation omitted ....The first step: Open git
Git Bash Chinese garbled characters in Windows,
Open Git Bash
Go to the directory: $ cd/etc
1. Edit the gitconfig file: $ vi gitconfig
Add content to the file
[Gui]
Encoding = UTF-8 # use UTF-8 in the code library
[I18n]
Commitencoding = GB2312 # log encoding. The default value is gb2312 In the window. It will n
When you open git bash, each time you are under the C:\Uer path, you need to first switch to the path you want to work with by using the CD command (CD/F/DSS). Modifying the default path when you open Git bash allows you to switch to a directory that you need to manage without having to use the CD command every time.To
When you open git bash, each time you are under the C:\Uer path, you need to first switch to the path you want to work with by using the CD command (CD/F/DSS). Modifying the default path when you open Git bash allows you to switch to a directory that you need to manage without having to use the CD command every time.To
Before uploading the code to GitHub is mainly through the client GitHub desktop or Web page, after changing the computer to feel the installation of the client is too troublesome, the way to know the command line is very necessary.The experiment here is to commit some code changes to the Json.git repository."LS" is a Linux command that is used to view files and folders in the current directory.The GIT init command is used to initialize the current dir
Sources: http://digitaldrummerj.me/proxy-configurations/When you were using NPM, Bower, and git behind a proxy server you had to do a little bit of configuration. Luckily it is a super easy-to-do these configurations. Almost all of the programs has command line commands to set and unset the proxy server.Updates:
Updated 2015-feb-01:added Running Source command for Bash and Ruby Gems sections
Up
Desktop icons Click the right mouse button, select Properties, modify the working directory to your own git directory:Open quick Edit, when the left mouse button can randomly select text, enter key copy. The right mouse button is pasted. In addition, the pasted shortcut key is the Inerst keyTo modify the default window sizeIf you feel that your git bash is runnin
Using git bash in Windows will often use functions such as selection, copying, and pasting. However, the general method is complicated. After reading some documents, this section describes the implementation of some common editing functions.
(1)Default method:
Click the icon in the upper left corner, or right-click the entire Upper window area and select edit;
Copy operation: Select "tag" to select a c
Desktop icons Click the right mouse button, select Properties, modify the working directory to your own git directory:Open quick Edit, when the left mouse button can randomly select text, enter key copy. The right mouse button is pasted. In addition, the pasted shortcut key is the Inerst keyTo modify the default window sizeIf you feel that your git bash is runnin
Add the following configuration information under Git installation directory etc
1,/etc/gitconfig:
[GUI]
encoding = Utf-8 #代码库统一用urf-8 to display Chinese in the Git GUI
[i18n]
commitencoding = GB2312 #log编码, window under the default gb2312, after the declaration sent to the server will not garbled
[SVN]
pathnameencoding = GB2312 #支持中文路径
2,/etc/git-complet
After downloading the Windows version of Git, garbled:This is obviously intolerable and the solution is as follows:Modify the profile file in the C:\Program files (x86) \git\etc My installation directory to add a paragraph:Alias ll='/bin/ls-alf--show-control-chars--color=tty'ls=' /bin/ls--show-control-chars-f--color=tty 'Note that sometimes you will be prompted to occupy the file, but with the resource mana
Solve the problem that the Composer command cannot be identified in Git Bash in Windows, gitcomposerIdeas
Simulate Linux, copy a composer file to the/usr subdirectory of Git Bash, and grant the execution permission.
Solution
First, determine the path of your composer. phar file. My website is/d/wamp64/bin/php/php5.6
Add the following configuration information under Git installation directory etc
1,/etc/gitconfig:
[GUI]encoding = Utf-8 #代码库统一用urf-8 to display Chinese in the Git GUI[i18n]commitencoding = GB2312 #log编码, window under the default gb2312, after the declaration sent to the server will not garbled[SVN]pathnameencoding = GB2312 #支持中文路径
2,/etc/git-completion.bash:
1. Download and install: http://jingyan.baidu.com/article/7f766dafba84f04101e1d0b0.html2. Verify the public key: https://git-scm.com/book/zh/v1/%e6%9c%8d%e5%8a%a1%e5%99%a8%e4%b8%8a%e7%9a%84-git-%e7%94%9f%e6%88%90- Ssh-%e5%85%ac%e9%92%a5HTTP://BLOG.CSDN.NET/HUSTPZB/ARTICLE/DETAILS/8230454/(reprinted from http://blog.csdn.net/hustpzb/article/details/8230454/ )(the first two have experienced there is no detail
IdeasSimulate Linux, copy a composer file to Git Bash's/usr subdirectory, and give execute permissions.SolveFirst, make sure your Composer.phar file path. Mine is: /d/wamp64/bin/php/php5. 6.31/composer.phar (please put similar d:\ Changed to/d/).Then copy, and Modify permissionsCp/d/wamp64/bin/php/php5.6.31/composer.phar/usr/local/bin/composerchmod A+x/usr/local/bin/composerTestTroubleshoot a Windows environment that does not recognize the Composer c
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.