cd

简单快速的上手使用gitbash

邮差的信 提交于 2019-12-07 15:57:53
在实际的开始工作中,某些项目涉及到多人协作时,github的使用必不可少; 当小白新进入一家公司时,很有可能不会开启一个全新的项目,而是跟进公司现在正在做的项目,比如,我.... 在此设定下,整理了这份gitbash使用上手教程。 在公司已有的项目的前提下,简单快速的上手使用gitbash (已安装好gitbash) 第一步、本地新建存放公司项目的文件夹; 此时有两种途径可以使gitbash进入到项目文件夹 1.可以在该文件夹直接右键打开gitbash 2.或者直接启动GitBash程序,然后 使用cd命令进入创建好的文件夹; 第二步、使用git clone命令,将github上面的代码克隆到本地 首先,打开公司已创建好的github项目目录,找到代码地址 然后,使用git clone命令,将代码克隆到本地 接下来会提示你输入账号、密码,密码输入时不显示,输错了可以删除 正确输入账号密码后,gitbash进入下载状态 克隆完成! 第三步、进入刚开始创建的源代码存放文件夹 使用cd命令,在gitbash中进入下载后的源代码文件夹wxt _webhome 第四步、修改项目内容 当本地的项目文件夹内容发生更改时(此处我们新建一个test文件): 使用git status命令可以检测到当前修改,被改动的文件夹以红名形式显示: 第五步、将改动添加到本地版本库 修改完成后,我们使用git

谈一谈前端工程化

喜你入骨 提交于 2019-12-07 15:28:51
前端持续集成 先来讲下前端持续集成的流程吧,我画了一个简图。 我的目标是构建一个工程化的全自动环境,使得开发者在 不改变现有工作方式的前提下(无痛) 完成代码集成等一系列工作。影响的角色:开发,测试,产品经理,领导。 (图中实线代表需要手动进行,虚线代表自动执行) 1.1开发者首先提交代码到中央仓库,中央仓库触发钩子通知CI Server有代码提交。( 开发者不需要为此做任何改变,和以前一样提交代码就可以 了) 1.2.收到通知后CI Server会自动执行一段脚本(checkout->build->lint->test).完成之后会发邮件(调用Mail Service)通知开发者和代码维护者(比如tester等)构建信息 (全自动) 2.1开发人员给代码打tag,中央仓库触发钩子通知CD Server有tag生成。( 开发者不需要为此做任何改变,和以前一样打tag就可以 了) 2.2收到通知后CD Server自动执行一段脚本(checkout->build->deploy) (全自动) 2.3项目上线后出现问题(报错)会邮件(调用Mail Service)通知开发者(图中也通知了维护者,视情况而定)报错的函数和上下文信息,方便开发及时发现问题并快速排查。 (全自动) 3.1开发者首先提交代码到中央仓库,中央仓库触发钩子通知package analyser(

cd option to change to previous directory

怎甘沉沦 提交于 2019-12-07 00:16:51
问题 I'm a complete newbie to bash scripting. I remember there was a way to execute the cd command, automatically returning to the previous directory (without an explicit cd ... ). Any idea? 回答1: If you just want to go back to the last directory, you can use cd - . If you need more places to go back to, try pushd <dir> (instead of cd <dir> ) and then you can go back with popd . 回答2: Found! I can execute it as a sub-shell. A command list embedded between parentheses runs as a subshell. SOURCE: http

Travis configuration of phpcs for only current commit files

╄→尐↘猪︶ㄣ 提交于 2019-12-06 15:47:42
I am configuring phpcs in Travis. In order to check PHP code standard on commit push with travis CI. I am using following script script: - phpcs --standard=PSR2 $(find ./ -name '*.php') But this script checks each .php file. I need Travis to check only the current committed files. Does someone has any solution for this case? Thanks in advance. What you could try is the following: get last commit id: ( How to get the last commit ID of a remote repo using curl-like command? ) git log --format="%H" -n 1 Then get files in last commit: ( How to list all the files in a commit? ) git diff-tree --no

How to follow a shortcut in powershell

别等时光非礼了梦想. 提交于 2019-12-06 08:13:34
In powershell, you use cd dir to go into the directory dir . But if dir is a shortcut to a directory, cd dir and cd dir.lnk both give an error, saying that the directory doesn't exist. So how do I follow that shortcut? (In Linux cd dir just works . In Windows, I've got no idea) Using the shell com-object, you can get the target path and from there, do what you wish. Get-ShortcutTargetPath function Get-ShortcutTargetPath($fileName) { $sh = New-Object -COM WScript.Shell $targetPath = $sh.CreateShortcut($fileName).TargetPath [System.Runtime.Interopservices.Marshal]::ReleaseComObject($sh) | Out

mysql system command

≡放荡痞女 提交于 2019-12-06 06:16:42
I am in MySQL and would like to change the current working directory. I tried to execute: mysql> system cd './my_dir' However, this does not seem to work. Has anyone run into a similar problem? System is going to spawn a child process to run a shell command..... Current working directory is a process level property....so you can't change it in the parent from a child process. That's why it doesn't work. I briefly scanned the MySQL docs at http://dev.mysql.com/doc/refman/5.5/en/mysql-commands.html but didn't see a direct CD command that changes the working directory. I think an adventurous

Autorunning program from CD or USB on Win7/8

社会主义新天地 提交于 2019-12-06 02:49:11
问题 I work for an IT shop that sees some computers come in with rather nasty viruses. We are working an autorun script that will run a malware killing tool (RKill) when we insert a USB or CD (preferably USB.) We want to run the tool as soon as the USB or CD is inserted without having UAC popup, ideally anyway. Our second choice is to have it open the Autorun options, even on PCs that have been locked down a la FBI virus. We have autorun.inf, a .bat that calls a .exe, and the .exe for the tool we

does cd command in a shell script load the rvmrc inside the destination directory?

混江龙づ霸主 提交于 2019-12-05 18:55:47
when you have something like.. given inside projectx an .rvmrc file specifying ruby 1.9.2 and having two rubies on my system (ree-1.8.7 and ruby1.9.2) #!/bin/bash cd applications/projectx which ruby ruby -v the last two lines output ree-1.8.7 and its path which was not I intended to use. Yes Rvm does define a wrapper around cd that looks like this: cd () { builtin cd "$@"; local result=$?; __rvm_project_rvmrc; __rvm_after_cd; return $result } It's difficult to tell why your .rvmrc isn't working. Rvm does support project-specific .rvmrc files, but you didn't post yours. You need to source rvm

How to push a commit to Github from a CircleCI build using a personal access token

亡梦爱人 提交于 2019-12-05 12:14:05
问题 When executing a build for git repository giantswarm/docs-content in CircleCI, I'd like to push a commit to another repository giantswarm/docs . I have this in the deployment section of circle.yml : git config credential.helper cache git config user.email "<some verified email>" git config user.name "Github Bot" git clone --depth 1 https://${GITHUB_PERSONAL_TOKEN}:x-oauth-basic@github.com/giantswarm/docs.git cd docs/ git commit --allow-empty -m "Trigger build and publishing via docs-content"

cd option to change to previous directory

强颜欢笑 提交于 2019-12-05 05:50:34
I'm a complete newbie to bash scripting. I remember there was a way to execute the cd command, automatically returning to the previous directory (without an explicit cd ... ). Any idea? If you just want to go back to the last directory, you can use cd - . If you need more places to go back to, try pushd <dir> (instead of cd <dir> ) and then you can go back with popd . Found! I can execute it as a sub-shell. A command list embedded between parentheses runs as a subshell. SOURCE: http://tldp.org/LDP/abs/html/subshells.html Also, pushd and popd can come in very handy - they represent operations